{"openapi":"3.1.0","info":{"title":"Cargo API","version":"1.0.0","description":"Cargo Platform API v1.\n\n## Authentication\n\nEvery endpoint requires a bearer token: `Authorization: Bearer <token>`.\nThere is no unauthenticated endpoint. Create a token with `cargo-ai login`,\nor complete OAuth 2.0 authorization code with PKCE (the `oauth2` scheme).\nAuthorization-server metadata (RFC 8414) is at\n`https://getcargo.eu.auth0.com/.well-known/oauth-authorization-server`.\n\n## Errors\n\nEvery 4xx and 5xx response is a JSON object carrying `errorMessage`, a\nhuman-readable description of what went wrong. A long tail of\norchestration routes carries `reason` instead, a machine-readable cause.\nRoutes may add fields, so treat the object as open rather than closed.\n\n## Rate limits\n\nRequests are counted per workspace. Every `/v1` response, including\nthe 401 an unauthenticated caller gets, carries `RateLimit`\n(`\"workspace\";r=<remaining>;t=<window seconds>`), `RateLimit-Limit`,\n`RateLimit-Remaining`, `RateLimit-Reset` and `RateLimit-Policy`, and\nthe legacy `X-RateLimit-*` spellings alongside them. A 429 carries\n`Retry-After` in seconds: back off by that, rather than retrying\nimmediately.\n\n## Idempotency\n\nPOST, PUT and PATCH accept an optional `Idempotency-Key` header. A\nretry with the same key and the same request returns the original\nresponse instead of creating a second record. Reusing a key with a\ndifferent request returns 422. A concurrent retry while the first\nrequest is still running returns 409. Keys expire after 24 hours.\nMultipart file uploads do not accept the header: the body is not\nparsed until after the key would have to be fingerprinted.\n\n## Versioning and deprecation\n\nThe version is in the path (`/v1`), and a breaking change ships as a new\npath rather than by altering this one. Adding a field to a response, a\nnew optional request field, or a new endpoint is not breaking, so a\nclient must ignore fields it does not recognise.\n\nThe deprecation policy is at https://docs.getcargo.ai/api-reference/versioning.\nWhen an endpoint is being retired it carries the `Deprecation` header\n(RFC 9745) and, once a removal date is fixed, `Sunset` (RFC 8594). Both\nare HTTP dates. There are at least 180 days between them. An endpoint\nmarked `deprecated` in this document is still served until its `Sunset`\npasses. No `/v1` operation is currently deprecated.\n\n## Long-running operations\n\nCreating a run or a batch does not wait for the work to finish. The\ncreate request returns `202 Accepted` with a `Location` header pointing\nat the run or batch. Poll that URL (or `GET` the run / batch by\n`uuid`) until it reaches a terminal status (`success`, `error`,\n`cancelled`, or `skipped`). Do not retry the create request while the\njob is still running. Action execute endpoints follow the same pattern\nunless `waitUntilFinished` is true, in which case a finished job is\n`200`."},"externalDocs":{"description":"API versioning and deprecation policy","url":"https://docs.getcargo.ai/api-reference/versioning"},"servers":[{"url":"https://api.getcargo.io/v1","description":"Cargo API"}],"security":[{"bearerAuth":[]},{"oauth2":["openid","profile","email","offline_access"]}],"paths":{"/ai/agents":{"post":{"operationId":"postAiAgents","summary":"Create agent","description":"Create a new AI agent (POST /ai/agents).","tags":["AI - Agents"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Agent name."},"icon":{"type":"object","properties":{"color":{"type":"string","enum":["grey","green","purple","yellow","blue","red"],"description":"Background color of the agent icon."},"face":{"type":"string","description":"Face glyph shown on the agent icon."}},"required":["color","face"],"title":"Icon","description":"Agent icon."},"description":{"title":"Description","description":"Agent description.","type":"string","minLength":1,"maxLength":1000},"triggers":{"title":"Triggers","description":"Agent triggers.","type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"text":{"type":"string","description":"Human-readable form of the cron schedule."}},"required":["name","description","type","cron","text"]},{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires from a connector event.","enum":["connector"]},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector that emits this trigger, if bound."},"integrationSlug":{"type":"string","description":"Integration that defines this trigger."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector-specific trigger configuration."}},"required":["name","description","type","connectorUuid","integrationSlug","config"]}]}},"folderUuid":{"title":"Folder UUID","description":"Folder identifier for the agent.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["name","icon"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create agent","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"uuid":{"type":"string","description":"Agent identifier."},"workspaceUuid":{"type":"string","description":"Workspace this agent belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who owns this agent, if any."},"name":{"type":"string","description":"Agent display name."},"icon":{"type":"object","properties":{"color":{"type":"string","enum":["grey","green","purple","yellow","blue","red"],"description":"Background color of the agent icon."},"face":{"type":"string","description":"Face glyph shown on the agent icon."}},"required":["color","face"],"additionalProperties":false,"description":"Icon shown for this agent."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this agent does, if set."},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"text":{"type":"string","description":"Human-readable form of the cron schedule."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this trigger."}},"required":["name","description","type","cron","text","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires from a connector event.","enum":["connector"]},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector that emits this trigger, if bound."},"integrationSlug":{"type":"string","description":"Integration that defines this trigger."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector-specific trigger configuration."}},"required":["name","description","type","connectorUuid","integrationSlug","config"],"additionalProperties":false}]},"description":"Triggers that start this agent."},"deployedRelease":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"userUuid":{"type":"string","description":"User who created this release."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available on this release."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities enabled on this release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested actions shown for this release."},"systemPrompt":{"type":"string","description":"System prompt used by this release."},"withReasoning":{"type":"boolean","description":"Whether the model is asked to reason before answering."},"temperature":{"type":"number","description":"Sampling temperature for the language model."},"maxSteps":{"type":"number","description":"Maximum tool-calling steps the agent may take."},"integrationSlug":{"type":"string","description":"LLM integration used by this release."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector for the language model, if any."},"languageModelSlug":{"type":"string","description":"Language model used by this release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients attached to this release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources the agent may use."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"}},"required":["uuid","userUuid","description","templateSlug","version","actions","capabilities","suggestedActions","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","mcpClients","resources","heartbeat","evaluator","deployedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Currently deployed release, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this agent is filed under, if any."},"template":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Template identifier."},"isAvailable":{"type":"boolean","description":"Whether this template can be used."},"scope":{"type":"string","enum":["public","private"],"description":"Whether the template is public or private to the workspace."}},"required":["slug","isAvailable","scope"],"additionalProperties":false},{"type":"null"}],"description":"Template this agent was created from, if any."},"isReadOnly":{"type":"boolean","description":"Whether this agent cannot be edited."},"createdAt":{"description":"Time this agent was created.","type":"string"},"updatedAt":{"description":"Time this agent was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this agent was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","icon","description","triggers","deployedRelease","folderUuid","template","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Agent","description":"Created agent details."}},"required":["agent"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/agents/list":{"get":{"operationId":"getAiAgentsList","summary":"List agents","description":"List all AI agents in the workspace (GET /ai/agents/list).","tags":["AI - Agents"],"responses":{"200":{"description":"List agents","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Agent identifier."},"workspaceUuid":{"type":"string","description":"Workspace this agent belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who owns this agent, if any."},"name":{"type":"string","description":"Agent display name."},"icon":{"type":"object","properties":{"color":{"type":"string","enum":["grey","green","purple","yellow","blue","red"],"description":"Background color of the agent icon."},"face":{"type":"string","description":"Face glyph shown on the agent icon."}},"required":["color","face"],"additionalProperties":false,"description":"Icon shown for this agent."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this agent does, if set."},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"text":{"type":"string","description":"Human-readable form of the cron schedule."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this trigger."}},"required":["name","description","type","cron","text","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires from a connector event.","enum":["connector"]},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector that emits this trigger, if bound."},"integrationSlug":{"type":"string","description":"Integration that defines this trigger."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector-specific trigger configuration."}},"required":["name","description","type","connectorUuid","integrationSlug","config"],"additionalProperties":false}]},"description":"Triggers that start this agent."},"deployedRelease":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"userUuid":{"type":"string","description":"User who created this release."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available on this release."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities enabled on this release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested actions shown for this release."},"systemPrompt":{"type":"string","description":"System prompt used by this release."},"withReasoning":{"type":"boolean","description":"Whether the model is asked to reason before answering."},"temperature":{"type":"number","description":"Sampling temperature for the language model."},"maxSteps":{"type":"number","description":"Maximum tool-calling steps the agent may take."},"integrationSlug":{"type":"string","description":"LLM integration used by this release."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector for the language model, if any."},"languageModelSlug":{"type":"string","description":"Language model used by this release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients attached to this release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources the agent may use."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"}},"required":["uuid","userUuid","description","templateSlug","version","actions","capabilities","suggestedActions","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","mcpClients","resources","heartbeat","evaluator","deployedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Currently deployed release, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this agent is filed under, if any."},"template":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Template identifier."},"isAvailable":{"type":"boolean","description":"Whether this template can be used."},"scope":{"type":"string","enum":["public","private"],"description":"Whether the template is public or private to the workspace."}},"required":["slug","isAvailable","scope"],"additionalProperties":false},{"type":"null"}],"description":"Template this agent was created from, if any."},"isReadOnly":{"type":"boolean","description":"Whether this agent cannot be edited."},"createdAt":{"description":"Time this agent was created.","type":"string"},"updatedAt":{"description":"Time this agent was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this agent was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","icon","description","triggers","deployedRelease","folderUuid","template","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"Agents","description":"List of agents."}},"required":["agents"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/agents/{uuid}":{"get":{"operationId":"getAiAgentsByUuid","summary":"Get agent","description":"Get an AI agent by UUID (GET /ai/agents/{uuid}).","tags":["AI - Agents"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Agent identifier."},"required":true,"description":"Agent identifier."}],"responses":{"200":{"description":"Get agent","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"uuid":{"type":"string","description":"Agent identifier."},"workspaceUuid":{"type":"string","description":"Workspace this agent belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who owns this agent, if any."},"name":{"type":"string","description":"Agent display name."},"icon":{"type":"object","properties":{"color":{"type":"string","enum":["grey","green","purple","yellow","blue","red"],"description":"Background color of the agent icon."},"face":{"type":"string","description":"Face glyph shown on the agent icon."}},"required":["color","face"],"additionalProperties":false,"description":"Icon shown for this agent."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this agent does, if set."},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"text":{"type":"string","description":"Human-readable form of the cron schedule."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this trigger."}},"required":["name","description","type","cron","text","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires from a connector event.","enum":["connector"]},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector that emits this trigger, if bound."},"integrationSlug":{"type":"string","description":"Integration that defines this trigger."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector-specific trigger configuration."}},"required":["name","description","type","connectorUuid","integrationSlug","config"],"additionalProperties":false}]},"description":"Triggers that start this agent."},"deployedRelease":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"userUuid":{"type":"string","description":"User who created this release."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available on this release."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities enabled on this release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested actions shown for this release."},"systemPrompt":{"type":"string","description":"System prompt used by this release."},"withReasoning":{"type":"boolean","description":"Whether the model is asked to reason before answering."},"temperature":{"type":"number","description":"Sampling temperature for the language model."},"maxSteps":{"type":"number","description":"Maximum tool-calling steps the agent may take."},"integrationSlug":{"type":"string","description":"LLM integration used by this release."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector for the language model, if any."},"languageModelSlug":{"type":"string","description":"Language model used by this release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients attached to this release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources the agent may use."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"}},"required":["uuid","userUuid","description","templateSlug","version","actions","capabilities","suggestedActions","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","mcpClients","resources","heartbeat","evaluator","deployedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Currently deployed release, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this agent is filed under, if any."},"template":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Template identifier."},"isAvailable":{"type":"boolean","description":"Whether this template can be used."},"scope":{"type":"string","enum":["public","private"],"description":"Whether the template is public or private to the workspace."}},"required":["slug","isAvailable","scope"],"additionalProperties":false},{"type":"null"}],"description":"Template this agent was created from, if any."},"isReadOnly":{"type":"boolean","description":"Whether this agent cannot be edited."},"createdAt":{"description":"Time this agent was created.","type":"string"},"updatedAt":{"description":"Time this agent was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this agent was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","icon","description","triggers","deployedRelease","folderUuid","template","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Agent","description":"Agent details."}},"required":["agent"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putAiAgentsByUuid","summary":"Update agent","description":"Update an AI agent (PUT /ai/agents/{uuid}).","tags":["AI - Agents"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Agent identifier."},"required":true,"description":"Agent identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Agent name.","type":"string","minLength":1,"maxLength":255},"icon":{"title":"Icon","description":"Agent icon.","type":"object","properties":{"color":{"type":"string","enum":["grey","green","purple","yellow","blue","red"],"description":"Background color of the agent icon."},"face":{"type":"string","description":"Face glyph shown on the agent icon."}},"required":["color","face"]},"description":{"title":"Description","description":"Agent description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"triggers":{"title":"Triggers","description":"Agent triggers.","type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"text":{"type":"string","description":"Human-readable form of the cron schedule."}},"required":["name","description","type","cron","text"]},{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires from a connector event.","enum":["connector"]},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector that emits this trigger, if bound."},"integrationSlug":{"type":"string","description":"Integration that defines this trigger."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector-specific trigger configuration."}},"required":["name","description","type","connectorUuid","integrationSlug","config"]}]}},"folderUuid":{"title":"Folder UUID","description":"Folder identifier for the agent.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"template":{"title":"Template","description":"Agent template.","type":"object","properties":{"isAvailable":{"type":"boolean","title":"Is available","description":"Whether the agent is available."},"scope":{"type":"string","enum":["public","private"],"title":"Scope","description":"Agent scope."}},"required":["isAvailable","scope"],"additionalProperties":false}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update agent","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"uuid":{"type":"string","description":"Agent identifier."},"workspaceUuid":{"type":"string","description":"Workspace this agent belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who owns this agent, if any."},"name":{"type":"string","description":"Agent display name."},"icon":{"type":"object","properties":{"color":{"type":"string","enum":["grey","green","purple","yellow","blue","red"],"description":"Background color of the agent icon."},"face":{"type":"string","description":"Face glyph shown on the agent icon."}},"required":["color","face"],"additionalProperties":false,"description":"Icon shown for this agent."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this agent does, if set."},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"text":{"type":"string","description":"Human-readable form of the cron schedule."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this trigger."}},"required":["name","description","type","cron","text","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires from a connector event.","enum":["connector"]},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector that emits this trigger, if bound."},"integrationSlug":{"type":"string","description":"Integration that defines this trigger."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector-specific trigger configuration."}},"required":["name","description","type","connectorUuid","integrationSlug","config"],"additionalProperties":false}]},"description":"Triggers that start this agent."},"deployedRelease":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"userUuid":{"type":"string","description":"User who created this release."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available on this release."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities enabled on this release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested actions shown for this release."},"systemPrompt":{"type":"string","description":"System prompt used by this release."},"withReasoning":{"type":"boolean","description":"Whether the model is asked to reason before answering."},"temperature":{"type":"number","description":"Sampling temperature for the language model."},"maxSteps":{"type":"number","description":"Maximum tool-calling steps the agent may take."},"integrationSlug":{"type":"string","description":"LLM integration used by this release."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector for the language model, if any."},"languageModelSlug":{"type":"string","description":"Language model used by this release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients attached to this release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources the agent may use."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"}},"required":["uuid","userUuid","description","templateSlug","version","actions","capabilities","suggestedActions","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","mcpClients","resources","heartbeat","evaluator","deployedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Currently deployed release, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this agent is filed under, if any."},"template":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Template identifier."},"isAvailable":{"type":"boolean","description":"Whether this template can be used."},"scope":{"type":"string","enum":["public","private"],"description":"Whether the template is public or private to the workspace."}},"required":["slug","isAvailable","scope"],"additionalProperties":false},{"type":"null"}],"description":"Template this agent was created from, if any."},"isReadOnly":{"type":"boolean","description":"Whether this agent cannot be edited."},"createdAt":{"description":"Time this agent was created.","type":"string"},"updatedAt":{"description":"Time this agent was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this agent was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","icon","description","triggers","deployedRelease","folderUuid","template","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Agent","description":"Updated agent details."}},"required":["agent"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteAiAgentsByUuid","summary":"Remove agent","description":"Remove an AI agent (DELETE /ai/agents/{uuid}).","tags":["AI - Agents"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Agent identifier."},"required":true,"description":"Agent identifier."}],"responses":{"200":{"description":"Remove agent","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/chats":{"post":{"operationId":"postAiChats","summary":"Create chat","description":"Create a new chat session (POST /ai/chats).","tags":["AI - Chats"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Chat name.","type":"string","minLength":1,"maxLength":255},"agentUuid":{"title":"Agent UUID","description":"Agent identifier for the chat.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"releaseUuid":{"title":"Release UUID","description":"Release identifier for the chat.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"trigger":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Chat was started by a connector event.","enum":["connector"]},"connectorUuid":{"type":"string","description":"Connector that started this chat."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector-specific metadata for this trigger."}},"required":["type","connectorUuid","meta"]},{"type":"object","properties":{"type":{"type":"string","description":"Chat is an unsaved draft.","enum":["draft"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","description":"Chat was started from the browser extension.","enum":["web_extension"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Page URL the extension was used on, if known."}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","description":"Chat was started from a Cargo app.","enum":["app"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","description":"Chat was started from a workflow node.","enum":["workflow"]},"uuid":{"type":"string","description":"Workflow that started this chat."},"nodeUuid":{"type":"string","description":"Workflow node that started this chat."},"runUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow run that started this chat, if any."}},"required":["type","uuid","nodeUuid","runUuid"]}],"title":"Trigger","description":"Trigger configuration for the chat."},"heartbeat":{"title":"Heartbeat","description":"Optional heartbeat configuration. When set, the chat keeps waking itself up every intervalMinutes minutes, re-sending the prompt, until it reaches maxMessages messages.","type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"]},"evaluator":{"title":"Evaluator","description":"Optional evaluator configuration (rubric + quality threshold). When set, the heartbeat loop grades each output and keeps iterating until the score reaches the threshold or maxMessages is hit.","type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"]}},"required":["trigger"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create chat","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"chat":{"type":"object","properties":{"uuid":{"type":"string","description":"Chat identifier."},"slug":{"type":"string","description":"URL slug for this chat."},"traceUuid":{"type":"string","description":"Trace that records this chat."},"workspaceUuid":{"type":"string","description":"Workspace this chat belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this chat, if any."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this chat is talking to, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this chat is using, if any."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Chat display name, if set."},"trigger":{"description":"What started this chat."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"activeStreamUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"In-flight stream identifier, if a reply is streaming."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this chat."},"createdAt":{"description":"Time this chat was created.","type":"string"},"updatedAt":{"description":"Time this chat was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this chat was deleted, if it has been."},"lastMessage":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Message identifier."},"workspaceUuid":{"type":"string","description":"Workspace this message belongs to."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent that produced this message, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release used to generate this message, if any."},"chatUuid":{"type":"string","description":"Chat this message belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who sent this message, if any."},"status":{"type":"string","enum":["pending","generating","success","error","cancelling","cancelled"],"description":"Current generation status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from a failed generation, if any."},"type":{"type":"string","enum":["user","assistant"],"description":"Whether this message is from the user or the assistant."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time generation finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was deleted, if it has been."}},"required":["uuid","workspaceUuid","agentUuid","releaseUuid","chatUuid","userUuid","status","errorMessage","type","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent message in this chat, if any."}},"required":["uuid","slug","traceUuid","workspaceUuid","userUuid","agentUuid","releaseUuid","name","trigger","heartbeat","evaluator","activeStreamUuid","creditsUsedCount","createdAt","updatedAt","deletedAt","lastMessage"],"additionalProperties":false,"title":"Chat","description":"Created chat details."}},"required":["chat"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/chats/list":{"get":{"operationId":"getAiChatsList","summary":"List chats","description":"List all chat sessions (GET /ai/chats/list).","tags":["AI - Chats"],"parameters":[{"in":"query","name":"agentUuid","schema":{"title":"Agent UUID","description":"Filter chats by agent identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter chats by agent identifier."},{"in":"query","name":"releaseUuid","schema":{"title":"Release UUID","description":"Filter chats by release identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter chats by release identifier."},{"in":"query","name":"userUuid","schema":{"title":"User UUID","description":"Filter chats by user identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter chats by user identifier."},{"in":"query","name":"triggerType","schema":{"title":"Trigger type","description":"Filter chats by trigger type.","type":"string","enum":["connector","draft","web_extension","app","workflow"]},"description":"Filter chats by trigger type."},{"in":"query","name":"messageStatuses","schema":{"title":"Message statuses","description":"Filter chats by their last message status.","type":"array","items":{"type":"string","enum":["pending","generating","success","error","cancelling","cancelled"]}},"description":"Filter chats by their last message status."},{"in":"query","name":"name","schema":{"title":"Name","description":"Filter chats by name (partial match).","type":"string"},"description":"Filter chats by name (partial match)."},{"in":"query","name":"search","schema":{"title":"Search","description":"Case-insensitive partial match on chat name or slug.","type":"string","minLength":1},"description":"Case-insensitive partial match on chat name or slug."},{"in":"query","name":"createdAfter","schema":{"title":"Created after","description":"Filter chats created after this ISO date.","type":"string"},"description":"Filter chats created after this ISO date."},{"in":"query","name":"createdBefore","schema":{"title":"Created before","description":"Filter chats created before this ISO date.","type":"string"},"description":"Filter chats created before this ISO date."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of chats to return.","type":"string"},"description":"Maximum number of chats to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of chats to skip.","type":"string"},"description":"Number of chats to skip."}],"responses":{"200":{"description":"List chats","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"chats":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Chat identifier."},"slug":{"type":"string","description":"URL slug for this chat."},"traceUuid":{"type":"string","description":"Trace that records this chat."},"workspaceUuid":{"type":"string","description":"Workspace this chat belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this chat, if any."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this chat is talking to, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this chat is using, if any."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Chat display name, if set."},"trigger":{"description":"What started this chat."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"activeStreamUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"In-flight stream identifier, if a reply is streaming."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this chat."},"createdAt":{"description":"Time this chat was created.","type":"string"},"updatedAt":{"description":"Time this chat was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this chat was deleted, if it has been."},"lastMessage":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Message identifier."},"workspaceUuid":{"type":"string","description":"Workspace this message belongs to."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent that produced this message, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release used to generate this message, if any."},"chatUuid":{"type":"string","description":"Chat this message belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who sent this message, if any."},"status":{"type":"string","enum":["pending","generating","success","error","cancelling","cancelled"],"description":"Current generation status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from a failed generation, if any."},"type":{"type":"string","enum":["user","assistant"],"description":"Whether this message is from the user or the assistant."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time generation finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was deleted, if it has been."}},"required":["uuid","workspaceUuid","agentUuid","releaseUuid","chatUuid","userUuid","status","errorMessage","type","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent message in this chat, if any."}},"required":["uuid","slug","traceUuid","workspaceUuid","userUuid","agentUuid","releaseUuid","name","trigger","heartbeat","evaluator","activeStreamUuid","creditsUsedCount","createdAt","updatedAt","deletedAt","lastMessage"],"additionalProperties":false},"title":"Chats","description":"List of chats."}},"required":["chats"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/chats/{uuid}":{"get":{"operationId":"getAiChatsByUuid","summary":"Get chat","description":"Get a chat session by UUID (GET /ai/chats/{uuid}).","tags":["AI - Chats"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Chat identifier."},"required":true,"description":"Chat identifier."}],"responses":{"200":{"description":"Get chat","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"chat":{"type":"object","properties":{"uuid":{"type":"string","description":"Chat identifier."},"slug":{"type":"string","description":"URL slug for this chat."},"traceUuid":{"type":"string","description":"Trace that records this chat."},"workspaceUuid":{"type":"string","description":"Workspace this chat belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this chat, if any."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this chat is talking to, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this chat is using, if any."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Chat display name, if set."},"trigger":{"description":"What started this chat."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"activeStreamUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"In-flight stream identifier, if a reply is streaming."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this chat."},"createdAt":{"description":"Time this chat was created.","type":"string"},"updatedAt":{"description":"Time this chat was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this chat was deleted, if it has been."},"lastMessage":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Message identifier."},"workspaceUuid":{"type":"string","description":"Workspace this message belongs to."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent that produced this message, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release used to generate this message, if any."},"chatUuid":{"type":"string","description":"Chat this message belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who sent this message, if any."},"status":{"type":"string","enum":["pending","generating","success","error","cancelling","cancelled"],"description":"Current generation status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from a failed generation, if any."},"type":{"type":"string","enum":["user","assistant"],"description":"Whether this message is from the user or the assistant."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time generation finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was deleted, if it has been."}},"required":["uuid","workspaceUuid","agentUuid","releaseUuid","chatUuid","userUuid","status","errorMessage","type","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent message in this chat, if any."}},"required":["uuid","slug","traceUuid","workspaceUuid","userUuid","agentUuid","releaseUuid","name","trigger","heartbeat","evaluator","activeStreamUuid","creditsUsedCount","createdAt","updatedAt","deletedAt","lastMessage"],"additionalProperties":false,"title":"Chat","description":"Chat details."}},"required":["chat"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putAiChatsByUuid","summary":"Update chat","description":"Update a chat session (PUT /ai/chats/{uuid}).","tags":["AI - Chats"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Chat identifier."},"required":true,"description":"Chat identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"title":"Name","description":"Chat name."}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update chat","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"chat":{"type":"object","properties":{"uuid":{"type":"string","description":"Chat identifier."},"slug":{"type":"string","description":"URL slug for this chat."},"traceUuid":{"type":"string","description":"Trace that records this chat."},"workspaceUuid":{"type":"string","description":"Workspace this chat belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this chat, if any."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this chat is talking to, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this chat is using, if any."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Chat display name, if set."},"trigger":{"description":"What started this chat."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"activeStreamUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"In-flight stream identifier, if a reply is streaming."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this chat."},"createdAt":{"description":"Time this chat was created.","type":"string"},"updatedAt":{"description":"Time this chat was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this chat was deleted, if it has been."},"lastMessage":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Message identifier."},"workspaceUuid":{"type":"string","description":"Workspace this message belongs to."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent that produced this message, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release used to generate this message, if any."},"chatUuid":{"type":"string","description":"Chat this message belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who sent this message, if any."},"status":{"type":"string","enum":["pending","generating","success","error","cancelling","cancelled"],"description":"Current generation status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from a failed generation, if any."},"type":{"type":"string","enum":["user","assistant"],"description":"Whether this message is from the user or the assistant."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time generation finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was deleted, if it has been."}},"required":["uuid","workspaceUuid","agentUuid","releaseUuid","chatUuid","userUuid","status","errorMessage","type","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent message in this chat, if any."}},"required":["uuid","slug","traceUuid","workspaceUuid","userUuid","agentUuid","releaseUuid","name","trigger","heartbeat","evaluator","activeStreamUuid","creditsUsedCount","createdAt","updatedAt","deletedAt","lastMessage"],"additionalProperties":false,"title":"Chat","description":"Updated chat details."}},"required":["chat"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteAiChatsByUuid","summary":"Remove chat","description":"Remove a chat session (DELETE /ai/chats/{uuid}).","tags":["AI - Chats"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Chat identifier."},"required":true,"description":"Chat identifier."}],"responses":{"200":{"description":"Remove chat","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/documents":{"post":{"operationId":"postAiDocuments","summary":"Create document","description":"Create a new AI document (POST /ai/documents).","tags":["AI - Documents"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Document identifier."},"kind":{"type":"string","enum":["text","code","sheet","image"],"title":"Kind","description":"Document kind."},"title":{"type":"string","minLength":1,"maxLength":255,"title":"Title","description":"Document title."},"content":{"type":"string","title":"Content","description":"Document content."}},"required":["uuid","kind","title","content"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create document","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"object","properties":{"uuid":{"type":"string","description":"Document identifier."},"workspaceUuid":{"type":"string","description":"Workspace this document belongs to."},"userUuid":{"type":"string","description":"User who created this document."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Document title, if set."},"content":{"type":"string","description":"Document body."},"kind":{"type":"string","enum":["text","code","sheet","image"],"description":"Kind of document (text, code, sheet, or image)."},"createdAt":{"description":"Time this document was created.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this document was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","title","content","kind","createdAt","deletedAt"],"additionalProperties":false,"title":"Document","description":"Created document details."}},"required":["document"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/documents/list":{"get":{"operationId":"getAiDocumentsList","summary":"List documents","description":"List all AI documents (GET /ai/documents/list).","tags":["AI - Documents"],"parameters":[{"in":"query","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Document identifier."},"required":true,"description":"Document identifier."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of documents to return.","type":"string"},"description":"Maximum number of documents to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of documents to skip.","type":"string"},"description":"Number of documents to skip."}],"responses":{"200":{"description":"List documents","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Document identifier."},"workspaceUuid":{"type":"string","description":"Workspace this document belongs to."},"userUuid":{"type":"string","description":"User who created this document."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Document title, if set."},"content":{"type":"string","description":"Document body."},"kind":{"type":"string","enum":["text","code","sheet","image"],"description":"Kind of document (text, code, sheet, or image)."},"createdAt":{"description":"Time this document was created.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this document was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","title","content","kind","createdAt","deletedAt"],"additionalProperties":false},"title":"Documents","description":"List of documents."}},"required":["documents"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/documents/{uuid}":{"get":{"operationId":"getAiDocumentsByUuid","summary":"Get document","description":"Get an AI document by UUID (GET /ai/documents/{uuid}).","tags":["AI - Documents"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Document identifier."},"required":true,"description":"Document identifier."}],"responses":{"200":{"description":"Get document","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"object","properties":{"uuid":{"type":"string","description":"Document identifier."},"workspaceUuid":{"type":"string","description":"Workspace this document belongs to."},"userUuid":{"type":"string","description":"User who created this document."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Document title, if set."},"content":{"type":"string","description":"Document body."},"kind":{"type":"string","enum":["text","code","sheet","image"],"description":"Kind of document (text, code, sheet, or image)."},"createdAt":{"description":"Time this document was created.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this document was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","title","content","kind","createdAt","deletedAt"],"additionalProperties":false,"title":"Document","description":"Document details."}},"required":["document"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/documents/reset":{"post":{"operationId":"postAiDocumentsReset","summary":"Reset document","description":"Reset an AI document (POST /ai/documents/reset).","tags":["AI - Documents"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Document identifier."},"createdAt":{"type":"string","title":"Created at","description":"Creation timestamp to reset from."}},"required":["uuid","createdAt"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Reset document","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"object","properties":{"uuid":{"type":"string","description":"Document identifier."},"workspaceUuid":{"type":"string","description":"Workspace this document belongs to."},"userUuid":{"type":"string","description":"User who created this document."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Document title, if set."},"content":{"type":"string","description":"Document body."},"kind":{"type":"string","enum":["text","code","sheet","image"],"description":"Kind of document (text, code, sheet, or image)."},"createdAt":{"description":"Time this document was created.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this document was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","title","content","kind","createdAt","deletedAt"],"additionalProperties":false,"title":"Document","description":"Reset document details."}},"required":["document"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/evaluator/evaluate":{"post":{"operationId":"postAiEvaluatorEvaluate","summary":"Evaluate","description":"Run an AI evaluator (POST /ai/evaluator/evaluate).","tags":["AI - Evaluator"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageUuid":{"title":"Message UUID","description":"When set, the output to grade is read from this message's text.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"output":{"title":"Output","description":"Text to grade directly. Used when `messageUuid` is not provided.","type":"string"},"rubric":{"type":"string","minLength":1,"title":"Rubric","description":"Natural-language criteria describing what a good output looks like."},"context":{"title":"Context","description":"Optional extra context to ground the evaluation.","type":"string"}},"required":["rubric"],"additionalProperties":false,"title":"Request body","description":"Body schema for the evaluator evaluate endpoint. Provide either `messageUuid` or `output` as the thing to grade."}}}},"responses":{"200":{"description":"Evaluate","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"evaluation":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":1,"description":"Overall score from 0 to 1."},"passed":{"type":"boolean","description":"Whether the evaluation met the threshold."},"criteria":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of this evaluation criterion."},"passed":{"type":"boolean","description":"Whether this criterion passed."},"reason":{"type":"string","description":"Why this criterion passed or failed."}},"required":["name","passed","reason"],"additionalProperties":false},"description":"Per-criterion results for this evaluation."},"summary":{"type":"string","description":"Human-readable summary of the evaluation."}},"required":["score","passed","criteria","summary"],"additionalProperties":false}},"required":["evaluation"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/mcpClients/connect":{"post":{"operationId":"postAiMcpClientsConnect","summary":"Connect MCP client","description":"Connect to an MCP client (POST /ai/mcpClients/connect).","tags":["AI - MCP"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mcpClient":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"]},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"]},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"]}],"title":"MCP client","description":"MCP client connection details.","type":"object"}},"required":["mcpClient"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Connect MCP client","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","title":"Outcome","description":"Connection outcome.","enum":["connected"]},"tools":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","title":"Slug","description":"Tool slug identifier."},"description":{"title":"Description","description":"Tool description.","type":"string"},"config":{"type":"object","properties":{"jsonSchema":{"title":"JSON schema","description":"Tool configuration schema."}},"required":["jsonSchema"],"additionalProperties":false,"title":"Config","description":"Tool configuration."}},"required":["slug","config"],"additionalProperties":false},"title":"Tools","description":"Available tools from the MCP server."}},"required":["outcome","tools"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/mcpServers":{"post":{"operationId":"postAiMcpServers","summary":"Create MCP server","description":"Create a new MCP server (POST /ai/mcpServers).","tags":["AI - MCP"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"MCP server name."},"description":{"title":"Description","description":"MCP server description.","type":"string","minLength":1,"maxLength":1000},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]}]}]},"title":"Actions","description":"Actions exposed by the MCP server."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"]},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"]},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"]}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"]}]},"title":"Resources","description":"Resources exposed by the MCP server."},"folderUuid":{"title":"Folder UUID","description":"Folder identifier for the MCP server.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["name","actions","resources"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create MCP server","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mcpServer":{"type":"object","properties":{"uuid":{"type":"string","description":"MCP server identifier."},"workspaceUuid":{"type":"string","description":"Workspace this MCP server belongs to."},"userUuid":{"type":"string","description":"User who created this MCP server."},"name":{"type":"string","description":"MCP server display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this MCP server exposes, if set."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions this MCP server offers."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources this MCP server offers."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this MCP server is filed under, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this server was created from, if any."},"isReadOnly":{"type":"boolean","description":"Whether this MCP server cannot be edited."},"createdAt":{"description":"Time this MCP server was created.","type":"string"},"updatedAt":{"description":"Time this MCP server was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this MCP server was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","description","actions","resources","folderUuid","templateSlug","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"MCP server","description":"Created MCP server details."}},"required":["mcpServer"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/mcpServers/list":{"get":{"operationId":"getAiMcpServersList","summary":"List MCP servers","description":"List all MCP servers (GET /ai/mcpServers/list).","tags":["AI - MCP"],"responses":{"200":{"description":"List MCP servers","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mcpServers":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"MCP server identifier."},"workspaceUuid":{"type":"string","description":"Workspace this MCP server belongs to."},"userUuid":{"type":"string","description":"User who created this MCP server."},"name":{"type":"string","description":"MCP server display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this MCP server exposes, if set."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions this MCP server offers."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources this MCP server offers."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this MCP server is filed under, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this server was created from, if any."},"isReadOnly":{"type":"boolean","description":"Whether this MCP server cannot be edited."},"createdAt":{"description":"Time this MCP server was created.","type":"string"},"updatedAt":{"description":"Time this MCP server was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this MCP server was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","description","actions","resources","folderUuid","templateSlug","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"MCP servers","description":"List of MCP servers."}},"required":["mcpServers"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/mcpServers/{uuid}":{"get":{"operationId":"getAiMcpServersByUuid","summary":"Get MCP server","description":"Get an MCP server by UUID (GET /ai/mcpServers/{uuid}).","tags":["AI - MCP"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"MCP server identifier."},"required":true,"description":"MCP server identifier."}],"responses":{"200":{"description":"Get MCP server","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mcpServer":{"type":"object","properties":{"uuid":{"type":"string","description":"MCP server identifier."},"workspaceUuid":{"type":"string","description":"Workspace this MCP server belongs to."},"userUuid":{"type":"string","description":"User who created this MCP server."},"name":{"type":"string","description":"MCP server display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this MCP server exposes, if set."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions this MCP server offers."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources this MCP server offers."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this MCP server is filed under, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this server was created from, if any."},"isReadOnly":{"type":"boolean","description":"Whether this MCP server cannot be edited."},"createdAt":{"description":"Time this MCP server was created.","type":"string"},"updatedAt":{"description":"Time this MCP server was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this MCP server was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","description","actions","resources","folderUuid","templateSlug","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"MCP server","description":"MCP server details."}},"required":["mcpServer"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putAiMcpServersByUuid","summary":"Update MCP server","description":"Update an MCP server (PUT /ai/mcpServers/{uuid}).","tags":["AI - MCP"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"MCP server identifier."},"required":true,"description":"MCP server identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"MCP server name.","type":"string","minLength":1,"maxLength":255},"description":{"title":"Description","description":"MCP server description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"actions":{"title":"Actions","description":"Actions exposed by the MCP server.","type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]}]}]}},"resources":{"title":"Resources","description":"Resources exposed by the MCP server.","type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"]},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"]},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"]}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"]}]}},"folderUuid":{"title":"Folder UUID","description":"Folder identifier for the MCP server.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update MCP server","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mcpServer":{"type":"object","properties":{"uuid":{"type":"string","description":"MCP server identifier."},"workspaceUuid":{"type":"string","description":"Workspace this MCP server belongs to."},"userUuid":{"type":"string","description":"User who created this MCP server."},"name":{"type":"string","description":"MCP server display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this MCP server exposes, if set."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions this MCP server offers."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources this MCP server offers."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this MCP server is filed under, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this server was created from, if any."},"isReadOnly":{"type":"boolean","description":"Whether this MCP server cannot be edited."},"createdAt":{"description":"Time this MCP server was created.","type":"string"},"updatedAt":{"description":"Time this MCP server was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this MCP server was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","description","actions","resources","folderUuid","templateSlug","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"MCP server","description":"Updated MCP server details."}},"required":["mcpServer"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteAiMcpServersByUuid","summary":"Remove MCP server","description":"Remove an MCP server (DELETE /ai/mcpServers/{uuid}).","tags":["AI - MCP"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"MCP server identifier."},"required":true,"description":"MCP server identifier."}],"responses":{"200":{"description":"Remove MCP server","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/memories/list":{"get":{"operationId":"getAiMemoriesList","summary":"List memories","description":"List all AI memories. Query params: scope (user|agent), agentUuid (required when scope=agent) (GET /ai/memories/list).","tags":["AI - Memories"],"responses":{"200":{"description":"List memories","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"memories":{"type":"array","items":{"allOf":[{"type":"object","properties":{"mem0Id":{"type":"string","description":"Identifier of this memory in Mem0."},"content":{"type":"string","description":"Remembered text."},"createdAt":{"description":"Time this memory was created.","type":"string"},"updatedAt":{"description":"Time this memory was last updated.","type":"string"}},"required":["mem0Id","content","createdAt","updatedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"scope":{"type":"string","description":"Memory is scoped to a user.","enum":["user"]},"userUuid":{"type":"string","description":"User this memory belongs to."}},"required":["scope","userUuid"],"additionalProperties":false},{"type":"object","properties":{"scope":{"type":"string","description":"Memory is scoped to an agent.","enum":["agent"]},"agentUuid":{"type":"string","description":"Agent this memory belongs to."},"workspaceUuid":{"type":"string","description":"Workspace this agent memory belongs to."}},"required":["scope","agentUuid","workspaceUuid"],"additionalProperties":false}]}]},"title":"Memories","description":"List of memories."}},"required":["memories"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/memories/{mem0Id}":{"delete":{"operationId":"deleteAiMemoriesByMem0Id","summary":"Remove memory","description":"Remove an AI memory. Query params: scope (user|agent), agentUuid (required when scope=agent) (DELETE /ai/memories/{mem0Id}).","tags":["AI - Memories"],"parameters":[{"in":"path","name":"mem0Id","schema":{"type":"string","title":"Memory ID","description":"Memory identifier from Mem0."},"required":true,"description":"Memory identifier from Mem0."}],"responses":{"200":{"description":"Remove memory","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putAiMemoriesByMem0Id","summary":"Update memory","description":"Update an AI memory (PUT /ai/memories/{mem0Id}).","tags":["AI - Memories"],"parameters":[{"in":"path","name":"mem0Id","schema":{"type":"string","title":"Memory ID","description":"Memory identifier from Mem0."},"required":true,"description":"Memory identifier from Mem0."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"content":{"type":"string","title":"Content","description":"Memory content."},"scope":{"type":"string","title":"Scope","description":"Memory scope.","enum":["user"]}},"required":["content","scope"],"additionalProperties":false},{"type":"object","properties":{"content":{"type":"string","title":"Content","description":"Memory content."},"scope":{"type":"string","title":"Scope","description":"Memory scope.","enum":["agent"]},"agentUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Agent UUID","description":"Agent identifier for agent-scoped memories."}},"required":["content","scope","agentUuid"],"additionalProperties":false}],"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update memory","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/messages":{"post":{"operationId":"postAiMessages","summary":"Create message","description":"Create a new message in a chat. Returns the user message and a pending assistant message. The assistant response is processed asynchronously. (POST /ai/messages).","tags":["AI - Messages"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatUuid":{"title":"Chat UUID","description":"Chat identifier. When omitted, a new draft chat is created automatically and the message is added to it.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"agentUuid":{"title":"Agent UUID","description":"Agent identifier for the chat. Only used when chatUuid is omitted and a chat is created automatically.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"releaseUuid":{"title":"Release UUID","description":"Release identifier for the chat. Only used when chatUuid is omitted and a chat is created automatically.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parts":{"type":"array","items":{},"title":"Parts","description":"Message parts."},"actions":{"title":"Actions","description":"Actions available for the message.","type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]}]}]}},"resources":{"title":"Resources","description":"Resources available for the message.","type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"]},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"]},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"]}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"]}]}},"capabilities":{"title":"Capabilities","description":"Capabilities available for the message.","type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"description":"Sandbox-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"description":"Context-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"description":"App-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"]}],"type":"object"}}},"description":"Code-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"]}],"type":"object"}},"mcpClients":{"title":"MCP clients","description":"MCP clients to use for the message.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"]},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"]},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"]}],"type":"object"}},"systemPrompt":{"title":"System prompt","description":"System prompt for the message.","type":"string"},"withReasoning":{"title":"With reasoning","description":"Whether to include reasoning.","type":"boolean"},"temperature":{"title":"Temperature","description":"Sampling temperature.","type":"number"},"maxSteps":{"title":"Max steps","description":"Maximum number of steps.","type":"number"},"integrationSlug":{"title":"Integration slug","description":"Integration identifier.","type":"string"},"connectorUuid":{"title":"Connector UUID","description":"Connector identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"languageModelSlug":{"title":"Language model slug","description":"Language model identifier.","type":"string"},"output":{"title":"Output","description":"Output format for the assistant message. Defaults to text when omitted.","oneOf":[{"type":"object","properties":{"type":{"type":"string","description":"Agent output is freeform text.","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","description":"Agent output must match a JSON Schema.","enum":["jsonSchema"]},"jsonSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema the agent output must satisfy."}},"required":["type","jsonSchema"]}],"type":"object"}},"required":["parts"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create message","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"userMessage":{"type":"object","properties":{"uuid":{"type":"string","description":"Message identifier."},"workspaceUuid":{"type":"string","description":"Workspace this message belongs to."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent that produced this message, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release used to generate this message, if any."},"chatUuid":{"type":"string","description":"Chat this message belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who sent this message, if any."},"status":{"type":"string","enum":["pending","generating","success","error","cancelling","cancelled"],"description":"Current generation status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from a failed generation, if any."},"type":{"type":"string","enum":["user","assistant"],"description":"Whether this message is from the user or the assistant."},"parts":{"type":"array","items":{},"description":"Message parts such as text and tool calls."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available while generating this message."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources available while generating this message."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities available while generating this message."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients available while generating this message."},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System prompt used for this message, if set."},"withReasoning":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the model was asked to reason, if set."},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Sampling temperature used for this message, if set."},"maxSteps":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum tool-calling steps allowed for this message, if set."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM integration used for this message, if set."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector used for the language model, if any."},"languageModelSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Language model used for this message, if set."},"evaluatedTools":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Tool invocations evaluated while generating this message."},"usage":{"anyOf":[{"type":"object","properties":{"tokensUsedCount":{"type":"number","description":"Tokens consumed by this message."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this message."},"languageModelSlug":{"type":"string","description":"Language model that generated this message."},"connectorUuid":{"type":"string","description":"Connector used for the language model."}},"required":["tokensUsedCount","creditsUsedCount","languageModelSlug","connectorUuid"],"additionalProperties":false},{"type":"null"}],"description":"Token and credit usage for this message, if recorded."},"output":{"description":"Structured output produced by this message, if any."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Additional metadata for this message, if any."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested next actions after this message."},"temporalWorkflowId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Temporal workflow generating this message, if any."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time generation finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was deleted, if it has been."}},"required":["uuid","workspaceUuid","agentUuid","releaseUuid","chatUuid","userUuid","status","errorMessage","type","parts","actions","resources","capabilities","mcpClients","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","evaluatedTools","usage","output","meta","suggestedActions","temporalWorkflowId","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false,"title":"User message","description":"The created user message."},"assistantMessage":{"type":"object","properties":{"uuid":{"type":"string","description":"Message identifier."},"workspaceUuid":{"type":"string","description":"Workspace this message belongs to."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent that produced this message, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release used to generate this message, if any."},"chatUuid":{"type":"string","description":"Chat this message belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who sent this message, if any."},"status":{"type":"string","enum":["pending","generating","success","error","cancelling","cancelled"],"description":"Current generation status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from a failed generation, if any."},"type":{"type":"string","enum":["user","assistant"],"description":"Whether this message is from the user or the assistant."},"parts":{"type":"array","items":{},"description":"Message parts such as text and tool calls."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available while generating this message."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources available while generating this message."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities available while generating this message."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients available while generating this message."},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System prompt used for this message, if set."},"withReasoning":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the model was asked to reason, if set."},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Sampling temperature used for this message, if set."},"maxSteps":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum tool-calling steps allowed for this message, if set."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM integration used for this message, if set."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector used for the language model, if any."},"languageModelSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Language model used for this message, if set."},"evaluatedTools":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Tool invocations evaluated while generating this message."},"usage":{"anyOf":[{"type":"object","properties":{"tokensUsedCount":{"type":"number","description":"Tokens consumed by this message."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this message."},"languageModelSlug":{"type":"string","description":"Language model that generated this message."},"connectorUuid":{"type":"string","description":"Connector used for the language model."}},"required":["tokensUsedCount","creditsUsedCount","languageModelSlug","connectorUuid"],"additionalProperties":false},{"type":"null"}],"description":"Token and credit usage for this message, if recorded."},"output":{"description":"Structured output produced by this message, if any."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Additional metadata for this message, if any."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested next actions after this message."},"temporalWorkflowId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Temporal workflow generating this message, if any."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time generation finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was deleted, if it has been."}},"required":["uuid","workspaceUuid","agentUuid","releaseUuid","chatUuid","userUuid","status","errorMessage","type","parts","actions","resources","capabilities","mcpClients","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","evaluatedTools","usage","output","meta","suggestedActions","temporalWorkflowId","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false,"title":"Assistant message","description":"The created assistant message (initially pending while processing)."}},"required":["userMessage","assistantMessage"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/messages/{uuid}":{"get":{"operationId":"getAiMessagesByUuid","summary":"Get message","description":"Get a message by UUID (GET /ai/messages/{uuid}).","tags":["AI - Messages"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Message identifier."},"required":true,"description":"Message identifier."}],"responses":{"200":{"description":"Get message","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"uuid":{"type":"string","description":"Message identifier."},"workspaceUuid":{"type":"string","description":"Workspace this message belongs to."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent that produced this message, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release used to generate this message, if any."},"chatUuid":{"type":"string","description":"Chat this message belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who sent this message, if any."},"status":{"type":"string","enum":["pending","generating","success","error","cancelling","cancelled"],"description":"Current generation status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from a failed generation, if any."},"type":{"type":"string","enum":["user","assistant"],"description":"Whether this message is from the user or the assistant."},"parts":{"type":"array","items":{},"description":"Message parts such as text and tool calls."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available while generating this message."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources available while generating this message."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities available while generating this message."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients available while generating this message."},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System prompt used for this message, if set."},"withReasoning":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the model was asked to reason, if set."},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Sampling temperature used for this message, if set."},"maxSteps":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum tool-calling steps allowed for this message, if set."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM integration used for this message, if set."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector used for the language model, if any."},"languageModelSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Language model used for this message, if set."},"evaluatedTools":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Tool invocations evaluated while generating this message."},"usage":{"anyOf":[{"type":"object","properties":{"tokensUsedCount":{"type":"number","description":"Tokens consumed by this message."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this message."},"languageModelSlug":{"type":"string","description":"Language model that generated this message."},"connectorUuid":{"type":"string","description":"Connector used for the language model."}},"required":["tokensUsedCount","creditsUsedCount","languageModelSlug","connectorUuid"],"additionalProperties":false},{"type":"null"}],"description":"Token and credit usage for this message, if recorded."},"output":{"description":"Structured output produced by this message, if any."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Additional metadata for this message, if any."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested next actions after this message."},"temporalWorkflowId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Temporal workflow generating this message, if any."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time generation finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was deleted, if it has been."}},"required":["uuid","workspaceUuid","agentUuid","releaseUuid","chatUuid","userUuid","status","errorMessage","type","parts","actions","resources","capabilities","mcpClients","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","evaluatedTools","usage","output","meta","suggestedActions","temporalWorkflowId","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false,"title":"Message","description":"Message details."}},"required":["message"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteAiMessagesByUuid","summary":"Remove message","description":"Remove a message from a chat (DELETE /ai/messages/{uuid}).","tags":["AI - Messages"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Message identifier."},"required":true,"description":"Message identifier."}],"responses":{"200":{"description":"Remove message","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/messages/list":{"get":{"operationId":"getAiMessagesList","summary":"List messages","description":"List all messages in a chat (GET /ai/messages/list).","tags":["AI - Messages"],"parameters":[{"in":"query","name":"chatUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Chat UUID","description":"Chat identifier."},"required":true,"description":"Chat identifier."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of messages to return.","type":"string"},"description":"Maximum number of messages to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of messages to skip.","type":"string"},"description":"Number of messages to skip."}],"responses":{"200":{"description":"List messages","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Message identifier."},"workspaceUuid":{"type":"string","description":"Workspace this message belongs to."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent that produced this message, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release used to generate this message, if any."},"chatUuid":{"type":"string","description":"Chat this message belongs to."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who sent this message, if any."},"status":{"type":"string","enum":["pending","generating","success","error","cancelling","cancelled"],"description":"Current generation status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from a failed generation, if any."},"type":{"type":"string","enum":["user","assistant"],"description":"Whether this message is from the user or the assistant."},"parts":{"type":"array","items":{},"description":"Message parts such as text and tool calls."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available while generating this message."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources available while generating this message."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities available while generating this message."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients available while generating this message."},"systemPrompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System prompt used for this message, if set."},"withReasoning":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the model was asked to reason, if set."},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Sampling temperature used for this message, if set."},"maxSteps":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum tool-calling steps allowed for this message, if set."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM integration used for this message, if set."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector used for the language model, if any."},"languageModelSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Language model used for this message, if set."},"evaluatedTools":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Tool invocations evaluated while generating this message."},"usage":{"anyOf":[{"type":"object","properties":{"tokensUsedCount":{"type":"number","description":"Tokens consumed by this message."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this message."},"languageModelSlug":{"type":"string","description":"Language model that generated this message."},"connectorUuid":{"type":"string","description":"Connector used for the language model."}},"required":["tokensUsedCount","creditsUsedCount","languageModelSlug","connectorUuid"],"additionalProperties":false},{"type":"null"}],"description":"Token and credit usage for this message, if recorded."},"output":{"description":"Structured output produced by this message, if any."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Additional metadata for this message, if any."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested next actions after this message."},"temporalWorkflowId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Temporal workflow generating this message, if any."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time generation finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was deleted, if it has been."}},"required":["uuid","workspaceUuid","agentUuid","releaseUuid","chatUuid","userUuid","status","errorMessage","type","parts","actions","resources","capabilities","mcpClients","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","evaluatedTools","usage","output","meta","suggestedActions","temporalWorkflowId","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false},"title":"Messages","description":"List of messages."}},"required":["messages"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/messages/stream":{"post":{"operationId":"postAiMessagesStream","summary":"Stream message","description":"Stream a new message in a chat (POST /ai/messages/stream).","tags":["AI - Messages"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Chat UUID","description":"Chat identifier."},"chatTrigger":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Chat was started by a connector event.","enum":["connector"]},"connectorUuid":{"type":"string","description":"Connector that started this chat."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector-specific metadata for this trigger."}},"required":["type","connectorUuid","meta"]},{"type":"object","properties":{"type":{"type":"string","description":"Chat is an unsaved draft.","enum":["draft"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","description":"Chat was started from the browser extension.","enum":["web_extension"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Page URL the extension was used on, if known."}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","description":"Chat was started from a Cargo app.","enum":["app"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","description":"Chat was started from a workflow node.","enum":["workflow"]},"uuid":{"type":"string","description":"Workflow that started this chat."},"nodeUuid":{"type":"string","description":"Workflow node that started this chat."},"runUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow run that started this chat, if any."}},"required":["type","uuid","nodeUuid","runUuid"]}],"title":"Chat trigger","description":"Chat trigger configuration."},"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Message UUID","description":"Message identifier."},"parts":{"type":"array","items":{},"title":"Parts","description":"Message parts."},"agentUuid":{"title":"Agent UUID","description":"Agent identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"actions":{"title":"Actions","description":"Actions available for the message.","type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]}]}]}},"mcpClients":{"title":"MCP clients","description":"MCP clients to use for the message.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"]},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"]},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"]}],"type":"object"}},"resources":{"title":"Resources","description":"Resources available for the message.","type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"]},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"]},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"]}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"]}]}},"capabilities":{"title":"Capabilities","description":"Capabilities available for the message.","type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"description":"Sandbox-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"description":"Context-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"description":"App-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"]}],"type":"object"}}},"description":"Code-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"]}],"type":"object"}},"systemPrompt":{"title":"System prompt","description":"System prompt for the message.","type":"string"},"contextPrompt":{"title":"Context prompt","description":"Additional context for the message.","type":"string"},"withReasoning":{"title":"With reasoning","description":"Whether to include reasoning.","type":"boolean"},"temperature":{"title":"Temperature","description":"Sampling temperature.","type":"number"},"maxSteps":{"title":"Max steps","description":"Maximum number of steps.","type":"number"},"languageModelSlug":{"title":"Language model slug","description":"Language model identifier.","type":"string"},"integrationSlug":{"title":"Integration slug","description":"Integration identifier.","type":"string"},"connectorUuid":{"title":"Connector UUID","description":"Connector identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["chatUuid","chatTrigger","uuid","parts"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Stream message","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"errorMessage":{"type":"string","title":"Error message","description":"Error message when the request fails."}},"required":["errorMessage"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","enum":["lastMessageNotFinished"],"title":"Reason","description":"Failure reason."}},"required":["reason"],"additionalProperties":false}],"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/messages/resume-stream":{"get":{"operationId":"getAiMessagesResumeStream","summary":"Resume message stream","description":"Resume streaming a message (GET /ai/messages/resume-stream).","tags":["AI - Messages"],"parameters":[{"in":"query","name":"chatUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Chat UUID","description":"Chat identifier."},"required":true,"description":"Chat identifier."}],"responses":{"200":{"description":"Resume message stream","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"errorMessage":{"type":"string","title":"Error message","description":"Error message when the request fails."}},"required":["errorMessage"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/messages/cancel":{"post":{"operationId":"postAiMessagesCancel","summary":"Cancel messages","description":"Cancel messages that have associated Temporal workflows (workflow-backed messages). Skips messages that have no workflow or are already finished. (POST /ai/messages/cancel).","tags":["AI - Messages"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uuids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"title":"UUIDs","description":"Message identifiers to cancel."}},"required":["uuids"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Cancel messages","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/prompts/evaluate":{"post":{"operationId":"postAiPromptsEvaluate","summary":"Evaluate prompt","description":"Evaluate an AI prompt (POST /ai/prompts/evaluate).","tags":["AI - Prompts"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","title":"Prompt","description":"Prompt to evaluate."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]}]}]},"title":"Actions","description":"Actions available for evaluation."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"]},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"]},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"]}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"]}]},"title":"Resources","description":"Resources available for evaluation."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"description":"Sandbox-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"description":"Context-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"description":"App-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"]}],"type":"object"}}},"description":"Code-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"]}],"type":"object"},"title":"Capabilities","description":"Capabilities available for evaluation."}},"required":["prompt","actions","resources","capabilities"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Evaluate prompt","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","title":"Prompt","description":"Evaluated prompt."}},"required":["prompt"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/prompts/optimize":{"post":{"operationId":"postAiPromptsOptimize","summary":"Optimize prompt","description":"Optimize an AI prompt (POST /ai/prompts/optimize).","tags":["AI - Prompts"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","title":"Prompt","description":"Prompt to optimize."}},"required":["prompt"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Optimize prompt","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","title":"Prompt","description":"Optimized prompt."}},"required":["prompt"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/prompts/generateJsonSchema":{"post":{"operationId":"postAiPromptsGenerateJsonSchema","summary":"Generate prompt JSON schema","description":"Generate a JSON schema for the output of an AI prompt (POST /ai/prompts/generateJsonSchema).","tags":["AI - Prompts"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","title":"Prompt","description":"Prompt to generate a JSON schema for."},"systemPrompt":{"title":"System prompt","description":"Instructions given to the model alongside the prompt, used as extra context.","type":"string"}},"required":["prompt"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Generate prompt JSON schema","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"jsonSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"JSON schema","description":"Generated JSON schema."}},"required":["jsonSchema"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/releases/draft/deploy":{"post":{"operationId":"postAiReleasesDraftDeploy","summary":"Deploy draft release","description":"Deploy a draft release (POST /ai/releases/draft/deploy).","tags":["AI - Releases"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Agent UUID","description":"Agent identifier."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]}]}]},"title":"Actions","description":"Actions available in the release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"]},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"]},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"]}],"type":"object"},"title":"MCP clients","description":"MCP clients available in the release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"]},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"]},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"]}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"]}]},"title":"Resources","description":"Resources available in the release."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"description":"Sandbox-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"description":"Context-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"description":"App-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"]}],"type":"object"}}},"description":"Code-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"]}],"type":"object"},"title":"Capabilities","description":"Capabilities available in the release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"]},"description":"Actions the suggestion will run."}},"required":["text","actions"]},"title":"Suggested actions","description":"Suggested actions to include."},"systemPrompt":{"title":"System prompt","description":"System prompt for the release.","type":"string"},"withReasoning":{"title":"With reasoning","description":"Whether to include reasoning.","type":"boolean"},"temperature":{"title":"Temperature","description":"Sampling temperature.","type":"number"},"maxSteps":{"title":"Max steps","description":"Maximum number of steps.","type":"number"},"integrationSlug":{"type":"string","title":"Integration slug","description":"Integration identifier."},"connectorUuid":{"title":"Connector UUID","description":"Connector identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"languageModelSlug":{"type":"string","title":"Language model slug","description":"Language model identifier."},"output":{"title":"Output","description":"Output format for the release.","anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","description":"Agent output is freeform text.","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","description":"Agent output must match a JSON Schema.","enum":["jsonSchema"]},"jsonSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema the agent output must satisfy."}},"required":["type","jsonSchema"]}],"type":"object"},{"type":"null"}]},"heartbeat":{"title":"Heartbeat","description":"Heartbeat configuration for chats created from this release. Pass null to disable.","anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"]},{"type":"null"}]},"evaluator":{"title":"Evaluator","description":"Evaluator configuration (rubric + quality threshold) used to grade agent output. Pass null to disable.","anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"]},{"type":"null"}]},"version":{"title":"Version","description":"Release version (small semver, e.g. 1.2.3).","type":"string","pattern":"^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,4})$"},"description":{"title":"Description","description":"Release description.","type":"string","minLength":1,"maxLength":1000},"options":{"title":"Options","description":"Release options.","type":"object","properties":{"connectorUuidsByIntegrationSlug":{"title":"Connector UUIDs by integration slug","description":"Connector UUIDs keyed by integration slug.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"modelUuidsByIntegrationSlug":{"title":"Model UUIDs by integration slug","description":"Model UUIDs keyed by integration slug.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}}},"required":["agentUuid","actions","mcpClients","resources","capabilities","suggestedActions","integrationSlug","languageModelSlug"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Deploy draft release","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"agentUuid":{"type":"string","description":"Agent this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available on this release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources the agent may use."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities enabled on this release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested actions shown for this release."},"systemPrompt":{"type":"string","description":"System prompt used by this release."},"withReasoning":{"type":"boolean","description":"Whether the model is asked to reason before answering."},"temperature":{"type":"number","description":"Sampling temperature for the language model."},"maxSteps":{"type":"number","description":"Maximum tool-calling steps the agent may take."},"integrationSlug":{"type":"string","description":"LLM integration used by this release."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector for the language model, if any."},"languageModelSlug":{"type":"string","description":"Language model used by this release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients attached to this release."},"output":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","description":"Agent output is freeform text.","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Agent output must match a JSON Schema.","enum":["jsonSchema"]},"jsonSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema the agent output must satisfy."}},"required":["type","jsonSchema"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"Structured output schema, if configured."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"}},"required":["uuid","parentUuid","workspaceUuid","userUuid","agentUuid","description","templateSlug","version","status","actions","resources","capabilities","suggestedActions","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","mcpClients","output","heartbeat","evaluator","deployedAt","createdAt","updatedAt"],"additionalProperties":false,"title":"Release","description":"Deployed release details."}},"required":["release"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/releases/list":{"get":{"operationId":"getAiReleasesList","summary":"List releases","description":"List all releases (GET /ai/releases/list).","tags":["AI - Releases"],"parameters":[{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of releases to return.","type":"string"},"description":"Maximum number of releases to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of releases to skip.","type":"string"},"description":"Number of releases to skip."},{"in":"query","name":"statuses","schema":{"title":"Statuses","description":"Release statuses to include.","type":"array","items":{"type":"string","enum":["deployed","draft","archived"]}},"description":"Release statuses to include."},{"in":"query","name":"agentUuid","schema":{"title":"Agent UUID","description":"Filter releases by agent identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter releases by agent identifier."},{"in":"query","name":"userUuid","schema":{"title":"User UUID","description":"Filter releases by user identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter releases by user identifier."}],"responses":{"200":{"description":"List releases","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"releases":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"agentUuid":{"type":"string","description":"Agent this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available on this release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources the agent may use."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities enabled on this release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested actions shown for this release."},"systemPrompt":{"type":"string","description":"System prompt used by this release."},"withReasoning":{"type":"boolean","description":"Whether the model is asked to reason before answering."},"temperature":{"type":"number","description":"Sampling temperature for the language model."},"maxSteps":{"type":"number","description":"Maximum tool-calling steps the agent may take."},"integrationSlug":{"type":"string","description":"LLM integration used by this release."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector for the language model, if any."},"languageModelSlug":{"type":"string","description":"Language model used by this release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients attached to this release."},"output":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","description":"Agent output is freeform text.","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Agent output must match a JSON Schema.","enum":["jsonSchema"]},"jsonSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema the agent output must satisfy."}},"required":["type","jsonSchema"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"Structured output schema, if configured."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"}},"required":["uuid","parentUuid","workspaceUuid","userUuid","agentUuid","description","templateSlug","version","status","actions","resources","capabilities","suggestedActions","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","mcpClients","output","heartbeat","evaluator","deployedAt","createdAt","updatedAt"],"additionalProperties":false},"title":"Releases","description":"List of releases."}},"required":["releases"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/releases/draft":{"get":{"operationId":"getAiReleasesDraft","summary":"Get draft release","description":"Get the draft release (GET /ai/releases/draft).","tags":["AI - Releases"],"parameters":[{"in":"query","name":"agentUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Agent UUID","description":"Agent identifier."},"required":true,"description":"Agent identifier."}],"responses":{"200":{"description":"Get draft release","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"agentUuid":{"type":"string","description":"Agent this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available on this release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources the agent may use."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities enabled on this release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested actions shown for this release."},"systemPrompt":{"type":"string","description":"System prompt used by this release."},"withReasoning":{"type":"boolean","description":"Whether the model is asked to reason before answering."},"temperature":{"type":"number","description":"Sampling temperature for the language model."},"maxSteps":{"type":"number","description":"Maximum tool-calling steps the agent may take."},"integrationSlug":{"type":"string","description":"LLM integration used by this release."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector for the language model, if any."},"languageModelSlug":{"type":"string","description":"Language model used by this release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients attached to this release."},"output":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","description":"Agent output is freeform text.","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Agent output must match a JSON Schema.","enum":["jsonSchema"]},"jsonSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema the agent output must satisfy."}},"required":["type","jsonSchema"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"Structured output schema, if configured."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"}},"required":["uuid","parentUuid","workspaceUuid","userUuid","agentUuid","description","templateSlug","version","status","actions","resources","capabilities","suggestedActions","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","mcpClients","output","heartbeat","evaluator","deployedAt","createdAt","updatedAt"],"additionalProperties":false,"title":"Release","description":"Draft release details."}},"required":["release"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/releases/deployed":{"get":{"operationId":"getAiReleasesDeployed","summary":"Get deployed release","description":"Get the deployed release (GET /ai/releases/deployed).","tags":["AI - Releases"],"parameters":[{"in":"query","name":"agentUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Agent UUID","description":"Agent identifier."},"required":true,"description":"Agent identifier."}],"responses":{"200":{"description":"Get deployed release","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"agentUuid":{"type":"string","description":"Agent this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available on this release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources the agent may use."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities enabled on this release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested actions shown for this release."},"systemPrompt":{"type":"string","description":"System prompt used by this release."},"withReasoning":{"type":"boolean","description":"Whether the model is asked to reason before answering."},"temperature":{"type":"number","description":"Sampling temperature for the language model."},"maxSteps":{"type":"number","description":"Maximum tool-calling steps the agent may take."},"integrationSlug":{"type":"string","description":"LLM integration used by this release."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector for the language model, if any."},"languageModelSlug":{"type":"string","description":"Language model used by this release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients attached to this release."},"output":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","description":"Agent output is freeform text.","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Agent output must match a JSON Schema.","enum":["jsonSchema"]},"jsonSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema the agent output must satisfy."}},"required":["type","jsonSchema"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"Structured output schema, if configured."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"}},"required":["uuid","parentUuid","workspaceUuid","userUuid","agentUuid","description","templateSlug","version","status","actions","resources","capabilities","suggestedActions","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","mcpClients","output","heartbeat","evaluator","deployedAt","createdAt","updatedAt"],"additionalProperties":false,"title":"Release","description":"Deployed release details."}},"required":["release"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/releases/{uuid}":{"get":{"operationId":"getAiReleasesByUuid","summary":"Get release","description":"Get a release by UUID (GET /ai/releases/{uuid}).","tags":["AI - Releases"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Release identifier."},"required":true,"description":"Release identifier."}],"responses":{"200":{"description":"Get release","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"agentUuid":{"type":"string","description":"Agent this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available on this release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources the agent may use."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities enabled on this release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested actions shown for this release."},"systemPrompt":{"type":"string","description":"System prompt used by this release."},"withReasoning":{"type":"boolean","description":"Whether the model is asked to reason before answering."},"temperature":{"type":"number","description":"Sampling temperature for the language model."},"maxSteps":{"type":"number","description":"Maximum tool-calling steps the agent may take."},"integrationSlug":{"type":"string","description":"LLM integration used by this release."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector for the language model, if any."},"languageModelSlug":{"type":"string","description":"Language model used by this release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients attached to this release."},"output":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","description":"Agent output is freeform text.","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Agent output must match a JSON Schema.","enum":["jsonSchema"]},"jsonSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema the agent output must satisfy."}},"required":["type","jsonSchema"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"Structured output schema, if configured."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"}},"required":["uuid","parentUuid","workspaceUuid","userUuid","agentUuid","description","templateSlug","version","status","actions","resources","capabilities","suggestedActions","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","mcpClients","output","heartbeat","evaluator","deployedAt","createdAt","updatedAt"],"additionalProperties":false,"title":"Release","description":"Release details."}},"required":["release"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/releases/draft/update":{"put":{"operationId":"putAiReleasesDraftUpdate","summary":"Update draft release","description":"Update the draft release (PUT /ai/releases/draft/update).","tags":["AI - Releases"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Agent UUID","description":"Agent identifier."},"actions":{"title":"Actions","description":"Actions available in the draft release.","type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]}]}]}},"mcpClients":{"title":"MCP clients","description":"MCP clients available in the draft release.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"]},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"]},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"]}],"type":"object"}},"resources":{"title":"Resources","description":"Resources available in the draft release.","type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"]},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"]},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"]}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"]}]}},"capabilities":{"title":"Capabilities","description":"Capabilities available in the draft release.","type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"description":"Sandbox-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"description":"Context-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"description":"App-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"]}],"type":"object"}}},"description":"Code-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"]}],"type":"object"}},"suggestedActions":{"title":"Suggested actions","description":"Suggested actions to include.","type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"]},"description":"Actions the suggestion will run."}},"required":["text","actions"]}},"systemPrompt":{"title":"System prompt","description":"System prompt for the draft release.","type":"string"},"withReasoning":{"title":"With reasoning","description":"Whether to include reasoning.","type":"boolean"},"temperature":{"title":"Temperature","description":"Sampling temperature.","type":"number"},"maxSteps":{"title":"Max steps","description":"Maximum number of steps.","type":"number"},"integrationSlug":{"title":"Integration slug","description":"Integration identifier.","type":"string"},"connectorUuid":{"title":"Connector UUID","description":"Connector identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"languageModelSlug":{"title":"Language model slug","description":"Language model identifier.","type":"string"},"parentUuid":{"title":"Parent UUID","description":"Parent release identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"output":{"title":"Output","description":"Output format for the draft release. Pass null to inherit text output.","anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","description":"Agent output is freeform text.","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","description":"Agent output must match a JSON Schema.","enum":["jsonSchema"]},"jsonSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema the agent output must satisfy."}},"required":["type","jsonSchema"]}],"type":"object"},{"type":"null"}]},"heartbeat":{"title":"Heartbeat","description":"Heartbeat configuration for chats created from this release. Pass null to disable.","anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"]},{"type":"null"}]},"evaluator":{"title":"Evaluator","description":"Evaluator configuration (rubric + quality threshold) used to grade agent output. Pass null to disable.","anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"]},{"type":"null"}]},"options":{"title":"Options","description":"Draft release options.","type":"object","properties":{"connectorUuidsByIntegrationSlug":{"title":"Connector UUIDs by integration slug","description":"Connector UUIDs keyed by integration slug.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"modelUuidsByIntegrationSlug":{"title":"Model UUIDs by integration slug","description":"Model UUIDs keyed by integration slug.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}}},"required":["agentUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update draft release","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"agentUuid":{"type":"string","description":"Agent this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"actions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false}]}]},"description":"Actions available on this release."},"resources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"],"additionalProperties":false}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"],"additionalProperties":false}]},"description":"Resources the agent may use."},"capabilities":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"additionalProperties":false,"description":"Sandbox-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"additionalProperties":false,"description":"Context-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"additionalProperties":false,"description":"App-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false,"description":"Code-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"],"additionalProperties":false}],"type":"object"},"description":"Capabilities enabled on this release."},"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"description":"Suggested actions shown for this release."},"systemPrompt":{"type":"string","description":"System prompt used by this release."},"withReasoning":{"type":"boolean","description":"Whether the model is asked to reason before answering."},"temperature":{"type":"number","description":"Sampling temperature for the language model."},"maxSteps":{"type":"number","description":"Maximum tool-calling steps the agent may take."},"integrationSlug":{"type":"string","description":"LLM integration used by this release."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector for the language model, if any."},"languageModelSlug":{"type":"string","description":"Language model used by this release."},"mcpClients":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"MCP client talks to a custom server URL.","enum":["custom"]},"name":{"type":"string","description":"Display name of this MCP client."},"url":{"type":"string","description":"URL of the custom MCP server."},"authentication":{"anyOf":[{"type":"object","properties":{"issuedAt":{"type":"string","description":"Time the access token was issued."},"accessToken":{"type":"string","description":"OAuth access token."},"expiresIn":{"description":"Access-token lifetime in seconds, if provided.","type":"number"},"refreshToken":{"description":"OAuth refresh token, if issued.","type":"string"},"scope":{"description":"OAuth scopes granted to this token, if provided.","type":"string"},"tokenType":{"description":"OAuth token type, if provided.","type":"string"},"clientId":{"description":"OAuth client identifier, if stored.","type":"string"},"clientSecret":{"description":"OAuth client secret, if stored.","type":"string"}},"required":["issuedAt","accessToken"],"additionalProperties":false},{"type":"null"}],"description":"OAuth tokens used to call the server, if any."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","url","authentication","disabledToolSlugs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"MCP client is backed by a Cargo connector.","enum":["connector"]},"name":{"type":"string","description":"Display name of this MCP client."},"connectorUuid":{"type":"string","description":"Connector that hosts this MCP server."},"integrationSlug":{"type":"string","description":"Integration that defines this MCP client."},"disabledToolSlugs":{"type":"array","items":{"type":"string"},"description":"MCP tools that are hidden from the agent."}},"required":["kind","name","connectorUuid","integrationSlug","disabledToolSlugs"],"additionalProperties":false}],"type":"object"},"description":"MCP clients attached to this release."},"output":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","description":"Agent output is freeform text.","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Agent output must match a JSON Schema.","enum":["jsonSchema"]},"jsonSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema the agent output must satisfy."}},"required":["type","jsonSchema"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"Structured output schema, if configured."},"heartbeat":{"anyOf":[{"type":"object","properties":{"intervalMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minutes between heartbeat turns."},"maxMessages":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Maximum heartbeat messages to send."},"prompt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Prompt used for each heartbeat turn, if set."}},"required":["intervalMinutes","maxMessages","prompt"],"additionalProperties":false},{"type":"null"}],"description":"Heartbeat configuration, if enabled."},"evaluator":{"anyOf":[{"type":"object","properties":{"rubric":{"type":"string","minLength":1,"description":"Rubric used to score the agent."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Minimum score from 0 to 1 required to pass."}},"required":["rubric","threshold"],"additionalProperties":false},{"type":"null"}],"description":"Evaluation configuration, if enabled."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"}},"required":["uuid","parentUuid","workspaceUuid","userUuid","agentUuid","description","templateSlug","version","status","actions","resources","capabilities","suggestedActions","systemPrompt","withReasoning","temperature","maxSteps","integrationSlug","connectorUuid","languageModelSlug","mcpClients","output","heartbeat","evaluator","deployedAt","createdAt","updatedAt"],"additionalProperties":false,"title":"Release","description":"Updated draft release details."}},"required":["release"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/suggestedActions/generate":{"post":{"operationId":"postAiSuggestedActionsGenerate","summary":"Generate suggested actions","description":"Generate suggested actions for a chat (POST /ai/suggestedActions/generate).","tags":["AI - Suggested Actions"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cacheKey":{"title":"Cache key","description":"Cache key for suggested actions.","type":"string"},"messageUuid":{"title":"Message UUID","description":"Message identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"systemPrompt":{"title":"System prompt","description":"System prompt to use for generation.","type":"string"},"contextPrompt":{"title":"Context prompt","description":"Additional context for generation.","type":"string"},"agentUuid":{"title":"Agent UUID","description":"Agent identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"actions":{"title":"Actions","description":"Actions available for generation.","type":"array","items":{"allOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this action."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this action does, if set."},"isBulkAllowed":{"type":"boolean","description":"Whether this action can run on many records at once."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."}},"required":["name","slug","description","isBulkAllowed","config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes a workspace tool.","enum":["tool"]},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this tool was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the tool to finish."}},"required":["kind","toolUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action invokes another agent.","enum":["agent"]},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this action invokes, if bound."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this agent was created from, if any."},"waitUntilFinished":{"type":"boolean","description":"Whether the caller waits for the agent to finish."}},"required":["kind","agentUuid","templateSlug","waitUntilFinished"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action calls a connector integration.","enum":["connector"]},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"connectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this action calls, if bound."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","connectorUuid","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","description":"Action is a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]}]}]}},"resources":{"title":"Resources","description":"Resources available for generation.","type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes a workspace model.","enum":["model"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use this model."},"integrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration that backs this model, if any."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model this resource exposes, if bound."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},{"type":"null"}],"description":"Filter that limits which records the agent may read."},"selectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Model columns the agent may read, if restricted."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records the agent may read."},"isReadOnly":{"type":"boolean","description":"Whether the agent may only read this model."}},"required":["kind","name","slug","description","prompt","integrationSlug","modelUuid","filter","selectedColumnSlugs","limit","isReadOnly"]},{"type":"object","properties":{"kind":{"type":"string","description":"Resource exposes files and folders.","enum":["file"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource display name, if set."},"slug":{"type":"string","description":"Stable slug that identifies this resource."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this resource is for, if set."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instructions for how the agent should use these files."},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a single file.","enum":["file"]},"fileUuid":{"type":"string","description":"File this selection points to."}},"required":["kind","fileUuid"]},{"type":"object","properties":{"kind":{"type":"string","description":"Selection is a folder of files.","enum":["folder"]},"folderUuid":{"type":"string","description":"Folder this selection points to."}},"required":["kind","folderUuid"]}]},"description":"Files and folders this resource exposes."}},"required":["kind","name","slug","description","prompt","items"]}]}},"capabilities":{"title":"Capabilities","description":"Capabilities available for generation.","type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants a code sandbox.","enum":["sandbox"]},"config":{"type":"object","properties":{"scope":{"description":"Surface this sandbox is available on, if restricted.","type":"string","enum":["chat","agent"]}},"description":"Sandbox-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants workspace context.","enum":["context"]},"config":{"type":"object","properties":{"isReadOnly":{"description":"Whether context may only be read, not written.","type":"boolean"}},"description":"Context-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants access to a Cargo app.","enum":["app"]},"config":{"type":"object","properties":{"appUuid":{"description":"App this capability is scoped to, if any.","type":"string"},"canPromote":{"description":"Whether the agent may promote work into this app.","type":"boolean"}},"description":"App-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants git-backed code access.","enum":["code"]},"config":{"type":"object","properties":{"connectorUuid":{"description":"Git connector used to reach the repository, if any.","type":"string"},"repository":{"description":"Repository to check out, if set.","type":"string"},"defaultBranch":{"description":"Default branch to work on, if set.","type":"string"},"rootDirectory":{"description":"Directory within the repository to treat as the project root.","type":"string"},"env":{"description":"Environment variables available to code execution.","type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored in plaintext.","enum":["public"]},"value":{"type":"string","description":"Plaintext value of the environment variable."}},"required":["key","type","value"]},{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Environment variable name."},"type":{"type":"string","description":"Value is stored as an encrypted secret.","enum":["secret"]},"secretValue":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"description":"Encrypted secret value of the environment variable."}},"required":["key","type","secretValue"]}],"type":"object"}}},"description":"Code-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants document read and write.","enum":["document"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Document-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants web search.","enum":["webSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Web-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants model read and write.","enum":["model"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Model-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants file read and write.","enum":["file"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"File-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants documentation search.","enum":["documentationSearch"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Documentation-search configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants long-term memory.","enum":["memory"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Memory-specific configuration."}},"required":["slug","config"]},{"type":"object","properties":{"slug":{"type":"string","description":"Capability grants suggested next actions.","enum":["suggestedActions"]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Suggested-actions configuration."}},"required":["slug","config"]}],"type":"object"}}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Generate suggested actions","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"suggestedActions":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"Suggested prompt shown to the user."},"actions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Action to run when this suggestion is chosen."}},"required":["slug"],"additionalProperties":false},"description":"Actions the suggestion will run."}},"required":["text","actions"],"additionalProperties":false},"title":"Suggested actions","description":"Generated suggested actions."}},"required":["suggestedActions"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/templates/list":{"post":{"operationId":"postAiTemplatesList","summary":"List templates","description":"List all AI templates (POST /ai/templates/list).","tags":["AI - Templates"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hasDocumentation":{"title":"Has documentation","description":"Filter templates that have documentation.","type":"boolean"},"isPreset":{"title":"Is preset","description":"Filter templates that are presets.","type":"boolean"},"kinds":{"title":"Kinds","description":"Filter templates by kind.","type":"array","items":{"type":"string","enum":["agent","mcpServer"]}}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List templates","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{},"title":"Templates","description":"List of templates."}},"required":["templates"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/templates/{slug}":{"get":{"operationId":"getAiTemplatesBySlug","summary":"Get template","description":"Get an AI template by slug (GET /ai/templates/{slug}).","tags":["AI - Templates"],"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug","description":"Template slug."},"required":true,"description":"Template slug."}],"responses":{"200":{"description":"Get template","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"template":{"title":"Template","description":"Template details."}},"required":["template"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/templates/{slug}/documentation":{"get":{"operationId":"getAiTemplatesBySlugDocumentation","summary":"Get template documentation","description":"Get the documentation for an AI template (GET /ai/templates/{slug}/documentation).","tags":["AI - Templates"],"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug","description":"Template slug."},"required":true,"description":"Template slug."}],"responses":{"200":{"description":"Get template documentation","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"errorMessage":{"type":"string","title":"Error message","description":"Error message when the request fails."}},"required":["errorMessage"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","enum":["documentationNotFound"],"title":"Reason","description":"Failure reason."}},"required":["reason"],"additionalProperties":false}],"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/votes/list":{"get":{"operationId":"getAiVotesList","summary":"List votes","description":"List all votes (GET /ai/votes/list).","tags":["AI - Votes"],"parameters":[{"in":"query","name":"chatUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Chat UUID","description":"Chat identifier."},"required":true,"description":"Chat identifier."}],"responses":{"200":{"description":"List votes","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"votes":{"type":"array","items":{"type":"object","properties":{"workspaceUuid":{"type":"string","description":"Workspace this vote belongs to."},"userUuid":{"type":"string","description":"User who cast this vote."},"chatUuid":{"type":"string","description":"Chat the voted message belongs to."},"messageUuid":{"type":"string","description":"Message that was voted on."},"isUpvoted":{"type":"boolean","description":"Whether the vote is an upvote."},"updatedAt":{"description":"Time this vote was last updated.","type":"string"}},"required":["workspaceUuid","userUuid","chatUuid","messageUuid","isUpvoted","updatedAt"],"additionalProperties":false},"title":"Votes","description":"List of votes."}},"required":["votes"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/ai/votes":{"put":{"operationId":"putAiVotes","summary":"Upsert vote","description":"Create or update a vote (PUT /ai/votes).","tags":["AI - Votes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Chat UUID","description":"Chat identifier."},"messageUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Message UUID","description":"Message identifier."},"isUpvoted":{"type":"boolean","title":"Is upvoted","description":"Whether the message is upvoted."}},"required":["chatUuid","messageUuid","isUpvoted"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Upsert vote","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"vote":{"type":"object","properties":{"workspaceUuid":{"type":"string","description":"Workspace this vote belongs to."},"userUuid":{"type":"string","description":"User who cast this vote."},"chatUuid":{"type":"string","description":"Chat the voted message belongs to."},"messageUuid":{"type":"string","description":"Message that was voted on."},"isUpvoted":{"type":"boolean","description":"Whether the vote is an upvote."},"updatedAt":{"description":"Time this vote was last updated.","type":"string"}},"required":["workspaceUuid","userUuid","chatUuid","messageUuid","isUpvoted","updatedAt"],"additionalProperties":false,"title":"Vote","description":"Vote details."}},"required":["vote"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions":{"get":{"operationId":"getBillingSubscriptions","summary":"Get subscription","description":"Get the current workspace subscription (GET /billing/subscriptions).","tags":["Billing - Subscription"],"responses":{"200":{"description":"Get subscription","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"provider":{"type":"string","enum":["stripe","orb"]},"customerOrbId":{"type":"string"},"customerStripeId":{"type":"string"},"subscriptionStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"subscriptionStripeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"subscriptionAvailableCreditsCount":{"type":"number"},"subscriptionCreditsUsedCount":{"type":"number"},"additionalAvailableCreditsCount":{"type":"number"},"hasCredits":{"type":"boolean"},"creditsOverageBehaviors":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["billing.credits","storage.records","orchestration.executions"]},"action":{"type":"string","enum":["deny","allow"]}},"required":["unit","action"],"additionalProperties":false}},"creditsConsumptionBehaviors":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["billing.credits","storage.records","orchestration.executions"]},"action":{"type":"string","enum":["deny","allow"]}},"required":["unit","action"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"plan":{"type":"string","enum":["self-serve","enterprise"]},"cadence":{"type":"string","enum":["monthly","annual","one_time","quarterly","semi_annual","custom"]},"fixedPrice":{"type":"number"},"conversionRate":{"type":"number"},"startAt":{"type":"string"},"resetAt":{"type":"string"},"endAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasPendingChange":{"type":"boolean"},"futureChange":{"anyOf":[{"type":"object","properties":{"cadence":{"type":"string","enum":["monthly","annual","one_time","quarterly","semi_annual","custom"]},"fixedPrice":{"type":"number"},"creditsCount":{"type":"number"},"conversionRate":{"type":"number"},"startAt":{"type":"string"},"endAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["cadence","fixedPrice","creditsCount","conversionRate","startAt","endAt"],"additionalProperties":false},{"type":"null"}]},"topup":{"anyOf":[{"type":"object","properties":{"creditsCount":{"type":"number"},"threshold":{"type":"number"}},"required":["creditsCount","threshold"],"additionalProperties":false},{"type":"null"}]}},"required":["uuid","workspaceUuid","provider","customerOrbId","customerStripeId","subscriptionStatus","subscriptionStripeId","subscriptionAvailableCreditsCount","subscriptionCreditsUsedCount","additionalAvailableCreditsCount","hasCredits","creditsOverageBehaviors","creditsConsumptionBehaviors","createdAt","updatedAt","plan","cadence","fixedPrice","conversionRate","startAt","resetAt","endAt","hasPendingChange","futureChange","topup"],"additionalProperties":false,"title":"Subscription","description":"Subscription details."}},"required":["subscription"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions/creditCard":{"get":{"operationId":"getBillingSubscriptionsCreditCard","summary":"Get credit card","description":"Get the credit card on file (GET /billing/subscriptions/creditCard).","tags":["Billing - Subscription"],"responses":{"200":{"description":"Get credit card","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"creditCard":{"title":"Credit card","description":"Saved credit card details.","type":"object","properties":{"brand":{"type":"string"},"expMonth":{"type":"number"},"expYear":{"type":"number"},"last4":{"type":"string"}},"required":["brand","expMonth","expYear","last4"],"additionalProperties":false}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions/invoices":{"get":{"operationId":"getBillingSubscriptionsInvoices","summary":"Get invoices","description":"Get subscription invoices (GET /billing/subscriptions/invoices).","tags":["Billing - Subscription"],"responses":{"200":{"description":"Get invoices","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"isPaid":{"type":"boolean"},"currency":{"type":"string"},"amount":{"type":"number"},"dueDate":{"type":"string"},"url":{"type":"string"}},"required":["id","isPaid","currency","amount"],"additionalProperties":false},"title":"Invoices","description":"List of invoices."}},"required":["invoices"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions/portalSessions":{"post":{"operationId":"postBillingSubscriptionsPortalSessions","summary":"Create portal session","description":"Create a Stripe customer portal session (POST /billing/subscriptions/portalSessions).","tags":["Billing - Subscription"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Create portal session","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"portalSession":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false,"title":"Portal session","description":"Billing portal session details."}},"required":["portalSession"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions/stripePublishableKey":{"get":{"operationId":"getBillingSubscriptionsStripePublishableKey","summary":"Get Stripe publishable key","description":"Get the Stripe publishable key for tokenizing a card (GET /billing/subscriptions/stripePublishableKey).","tags":["Billing - Subscription"],"responses":{"200":{"description":"Get Stripe publishable key","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"publishableKey":{"type":"string","title":"Publishable key","description":"Stripe publishable key for this environment. Safe to expose: it can only create payment methods, not read or charge them."}},"required":["publishableKey"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions/paymentMethodPortalSessions":{"post":{"operationId":"postBillingSubscriptionsPaymentMethodPortalSessions","summary":"Create payment method portal session","description":"Create a Stripe portal session that opens directly on the card form (POST /billing/subscriptions/paymentMethodPortalSessions).","tags":["Billing - Subscription"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Create payment method portal session","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"portalSession":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false,"title":"Portal session","description":"Billing portal session details."}},"required":["portalSession"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions/setupIntent":{"post":{"operationId":"postBillingSubscriptionsSetupIntent","summary":"Create setup intent","description":"Create a Stripe setup intent for adding payment method (POST /billing/subscriptions/setupIntent).","tags":["Billing - Subscription"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Create setup intent","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"setupIntent":{"type":"object","properties":{"clientSecret":{"type":"string"}},"required":["clientSecret"],"additionalProperties":false,"title":"Setup intent","description":"Payment setup intent details."}},"required":["setupIntent"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions/creditsOverageBehaviors":{"put":{"operationId":"putBillingSubscriptionsCreditsOverageBehaviors","summary":"Update credits overage behaviors","description":"Update the credits overage behaviors settings (PUT /billing/subscriptions/creditsOverageBehaviors).","tags":["Billing - Subscription"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"creditsOverageBehaviors":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["billing.credits","storage.records","orchestration.executions"]},"action":{"type":"string","enum":["deny","allow"]}},"required":["unit","action"]},"title":"Credits overage behaviors","description":"Credits overage behavior configuration."}},"required":["creditsOverageBehaviors"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update credits overage behaviors","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions/paymentMethod":{"put":{"operationId":"putBillingSubscriptionsPaymentMethod","summary":"Update payment method","description":"Update the payment method on file (PUT /billing/subscriptions/paymentMethod).","tags":["Billing - Subscription"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paymentMethodId":{"type":"string","minLength":1,"title":"Payment method ID","description":"Payment method identifier."}},"required":["paymentMethodId"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update payment method","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions/plan":{"put":{"operationId":"putBillingSubscriptionsPlan","summary":"Update plan","description":"Update the subscription plan (PUT /billing/subscriptions/plan).","tags":["Billing - Subscription"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"creditsCount":{"type":"number","title":"Credits count","description":"Number of credits in the plan."},"cadence":{"type":"string","enum":["monthly","annual","one_time","quarterly","semi_annual","custom"],"title":"Cadence","description":"Billing cadence for the plan."}},"required":["creditsCount","cadence"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update plan","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"provider":{"type":"string","enum":["stripe","orb"]},"customerOrbId":{"type":"string"},"customerStripeId":{"type":"string"},"subscriptionStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"subscriptionStripeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"subscriptionAvailableCreditsCount":{"type":"number"},"subscriptionCreditsUsedCount":{"type":"number"},"additionalAvailableCreditsCount":{"type":"number"},"hasCredits":{"type":"boolean"},"creditsOverageBehaviors":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["billing.credits","storage.records","orchestration.executions"]},"action":{"type":"string","enum":["deny","allow"]}},"required":["unit","action"],"additionalProperties":false}},"creditsConsumptionBehaviors":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["billing.credits","storage.records","orchestration.executions"]},"action":{"type":"string","enum":["deny","allow"]}},"required":["unit","action"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"plan":{"type":"string","enum":["self-serve","enterprise"]},"cadence":{"type":"string","enum":["monthly","annual","one_time","quarterly","semi_annual","custom"]},"fixedPrice":{"type":"number"},"conversionRate":{"type":"number"},"startAt":{"type":"string"},"resetAt":{"type":"string"},"endAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasPendingChange":{"type":"boolean"},"futureChange":{"anyOf":[{"type":"object","properties":{"cadence":{"type":"string","enum":["monthly","annual","one_time","quarterly","semi_annual","custom"]},"fixedPrice":{"type":"number"},"creditsCount":{"type":"number"},"conversionRate":{"type":"number"},"startAt":{"type":"string"},"endAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["cadence","fixedPrice","creditsCount","conversionRate","startAt","endAt"],"additionalProperties":false},{"type":"null"}]},"topup":{"anyOf":[{"type":"object","properties":{"creditsCount":{"type":"number"},"threshold":{"type":"number"}},"required":["creditsCount","threshold"],"additionalProperties":false},{"type":"null"}]}},"required":["uuid","workspaceUuid","provider","customerOrbId","customerStripeId","subscriptionStatus","subscriptionStripeId","subscriptionAvailableCreditsCount","subscriptionCreditsUsedCount","additionalAvailableCreditsCount","hasCredits","creditsOverageBehaviors","creditsConsumptionBehaviors","createdAt","updatedAt","plan","cadence","fixedPrice","conversionRate","startAt","resetAt","endAt","hasPendingChange","futureChange","topup"],"additionalProperties":false,"title":"Subscription","description":"Updated subscription details."}},"required":["subscription"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/subscriptions/topup":{"put":{"operationId":"putBillingSubscriptionsTopup","summary":"Update topup","description":"Update the automatic topup settings (PUT /billing/subscriptions/topup).","tags":["Billing - Subscription"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether top-ups are enabled."},"threshold":{"type":"number","title":"Threshold","description":"Credit threshold that triggers a top-up."},"creditsCount":{"type":"number","title":"Credits count","description":"Number of credits to top up."}},"required":["enabled","threshold","creditsCount"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update topup","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"provider":{"type":"string","enum":["stripe","orb"]},"customerOrbId":{"type":"string"},"customerStripeId":{"type":"string"},"subscriptionStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"subscriptionStripeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"subscriptionAvailableCreditsCount":{"type":"number"},"subscriptionCreditsUsedCount":{"type":"number"},"additionalAvailableCreditsCount":{"type":"number"},"hasCredits":{"type":"boolean"},"creditsOverageBehaviors":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["billing.credits","storage.records","orchestration.executions"]},"action":{"type":"string","enum":["deny","allow"]}},"required":["unit","action"],"additionalProperties":false}},"creditsConsumptionBehaviors":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["billing.credits","storage.records","orchestration.executions"]},"action":{"type":"string","enum":["deny","allow"]}},"required":["unit","action"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"plan":{"type":"string","enum":["self-serve","enterprise"]},"cadence":{"type":"string","enum":["monthly","annual","one_time","quarterly","semi_annual","custom"]},"fixedPrice":{"type":"number"},"conversionRate":{"type":"number"},"startAt":{"type":"string"},"resetAt":{"type":"string"},"endAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasPendingChange":{"type":"boolean"},"futureChange":{"anyOf":[{"type":"object","properties":{"cadence":{"type":"string","enum":["monthly","annual","one_time","quarterly","semi_annual","custom"]},"fixedPrice":{"type":"number"},"creditsCount":{"type":"number"},"conversionRate":{"type":"number"},"startAt":{"type":"string"},"endAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["cadence","fixedPrice","creditsCount","conversionRate","startAt","endAt"],"additionalProperties":false},{"type":"null"}]},"topup":{"anyOf":[{"type":"object","properties":{"creditsCount":{"type":"number"},"threshold":{"type":"number"}},"required":["creditsCount","threshold"],"additionalProperties":false},{"type":"null"}]}},"required":["uuid","workspaceUuid","provider","customerOrbId","customerStripeId","subscriptionStatus","subscriptionStripeId","subscriptionAvailableCreditsCount","subscriptionCreditsUsedCount","additionalAvailableCreditsCount","hasCredits","creditsOverageBehaviors","creditsConsumptionBehaviors","createdAt","updatedAt","plan","cadence","fixedPrice","conversionRate","startAt","resetAt","endAt","hasPendingChange","futureChange","topup"],"additionalProperties":false,"title":"Subscription","description":"Updated subscription details."}},"required":["subscription"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/billing/usage/metrics":{"get":{"operationId":"getBillingUsageMetrics","summary":"Get usage metrics","description":"Get usage metrics for the workspace (GET /billing/usage/metrics).","tags":["Billing - Usage"],"parameters":[{"in":"query","name":"workflowUuid","schema":{"title":"Workflow UUID","description":"Filter metrics by workflow identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter metrics by workflow identifier."},{"in":"query","name":"modelUuid","schema":{"title":"Model UUID","description":"Filter metrics by model identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter metrics by model identifier."},{"in":"query","name":"connectorUuid","schema":{"title":"Connector UUID","description":"Filter metrics by connector identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter metrics by connector identifier."},{"in":"query","name":"integrationSlug","schema":{"title":"Integration slug","description":"Filter metrics by integration slug.","type":"string"},"description":"Filter metrics by integration slug."},{"in":"query","name":"slug","schema":{"title":"Slug","description":"Filter metrics by slug.","type":"string"},"description":"Filter metrics by slug."},{"in":"query","name":"agentUuid","schema":{"title":"Agent UUID","description":"Filter metrics by agent identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter metrics by agent identifier."},{"in":"query","name":"from","schema":{"type":"string","title":"From","description":"Start of the time range."},"required":true,"description":"Start of the time range."},{"in":"query","name":"to","schema":{"type":"string","title":"To","description":"End of the time range."},"required":true,"description":"End of the time range."},{"in":"query","name":"groupBy","schema":{"title":"Group by","description":"Group metrics by this dimension.","type":"string","enum":["integration_slug","connector_uuid","model_uuid","workflow_uuid","agent_uuid"]},"description":"Group metrics by this dimension."},{"in":"query","name":"unit","schema":{"title":"Unit","description":"Usage unit to report.","type":"string","enum":["billing.credits","storage.records","orchestration.executions"]},"description":"Usage unit to report."}],"responses":{"200":{"description":"Get usage metrics","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"metrics":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"count":{"type":"number"},"groupBy":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["slug","count","groupBy"],"additionalProperties":false}}},"required":["date","items"],"additionalProperties":false},"title":"Metrics","description":"Usage metrics for the selected range."}},"required":["metrics"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/connectors":{"post":{"operationId":"postConnectionConnectors","summary":"Create connector","description":"Create a new connector (POST /connection/connectors).","tags":["Connection - Connectors"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Connector name."},"slug":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Slug","description":"Connector slug."},"integrationSlug":{"type":"string","title":"Integration slug","description":"Integration identifier."},"config":{"title":"Config","description":"Connector configuration.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"rateLimit":{"title":"Rate limit","description":"Rate limit configuration.","type":"object","properties":{"unit":{"type":"string","enum":["day","hour","minute","second"],"title":"Unit","description":"Rate limit time unit."},"max":{"type":"number","title":"Max","description":"Maximum requests per unit."},"strategy":{"type":"string","enum":["spread","burst"],"title":"Strategy","description":"Rate limit strategy: spread requests evenly or allow burst then wait."}},"required":["unit","max","strategy"]},"cacheTtlMilliseconds":{"title":"Cache TTL milliseconds","description":"Cache time-to-live in milliseconds.","type":"number"}},"required":["name","slug","integrationSlug"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create connector","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"connector":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Connector identifier."},"workspaceUuid":{"type":"string","description":"Workspace this connector belongs to."},"userUuid":{"type":"string","description":"User who created this connector."},"name":{"type":"string","description":"Connector display name."},"slug":{"type":"string","description":"URL-safe identifier for this connector."},"rateLimit":{"anyOf":[{"type":"object","properties":{"unit":{"type":"string","enum":["day","hour","minute","second"],"description":"Time window the rate limit applies to."},"max":{"type":"number","description":"Maximum number of calls allowed in the window."}},"required":["unit","max"],"additionalProperties":false},{"type":"null"}],"description":"Per-connector call limit, if any."},"cacheTtlMilliseconds":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How long connector responses may be cached, in milliseconds."},"integrationSlug":{"type":"string","description":"Integration this connector is an instance of."},"isDefault":{"type":"boolean","description":"Whether this is the workspace's default connector for its integration."},"playsCount":{"type":"number","description":"Number of plays that use this connector."},"toolsCount":{"type":"number","description":"Number of tools that use this connector."},"modelsCount":{"type":"number","description":"Number of models that use this connector."},"createdAt":{"description":"Time this connector was created.","type":"string"},"updatedAt":{"description":"Time this connector was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this connector was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","slug","rateLimit","cacheTtlMilliseconds","integrationSlug","isDefault","playsCount","toolsCount","modelsCount","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"useCredits":{"type":"boolean","description":"Connector bills usage against workspace credits.","enum":[true]},"config":{"type":"null","description":"Credentials are omitted when the connector uses credits."}},"required":["useCredits","config"],"additionalProperties":false},{"type":"object","properties":{"useCredits":{"type":"boolean","description":"Connector uses its own credentials instead of workspace credits.","enum":[false]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector credentials and settings."}},"required":["useCredits","config"],"additionalProperties":false}]}],"title":"Connector","description":"Connector details."},"dataset":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Dataset identifier."},"workspaceUuid":{"type":"string","description":"Workspace this dataset belongs to."},"slug":{"type":"string","description":"Dataset slug."},"createdAt":{"description":"Time this dataset was created.","type":"string"},"updatedAt":{"description":"Time this dataset was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this dataset was deleted, if it has been."}},"required":["uuid","workspaceUuid","slug","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Dataset is backed by a connector.","enum":["connector"]},"connectorUuid":{"type":"string","description":"Connector this dataset is synced from."}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Dataset is a workspace-native store.","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"Dataset","description":"Created dataset details."}},"required":["connector","dataset"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/connectors/list":{"get":{"operationId":"getConnectionConnectorsList","summary":"List connectors","description":"List all connectors in the workspace (GET /connection/connectors/list).","tags":["Connection - Connectors"],"parameters":[{"in":"query","name":"integrationSlug","schema":{"title":"Integration slug","description":"Filter connectors by integration slug.","type":"string"},"description":"Filter connectors by integration slug."}],"responses":{"200":{"description":"List connectors","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"connectors":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Connector identifier."},"workspaceUuid":{"type":"string","description":"Workspace this connector belongs to."},"userUuid":{"type":"string","description":"User who created this connector."},"name":{"type":"string","description":"Connector display name."},"slug":{"type":"string","description":"URL-safe identifier for this connector."},"rateLimit":{"anyOf":[{"type":"object","properties":{"unit":{"type":"string","enum":["day","hour","minute","second"],"description":"Time window the rate limit applies to."},"max":{"type":"number","description":"Maximum number of calls allowed in the window."}},"required":["unit","max"],"additionalProperties":false},{"type":"null"}],"description":"Per-connector call limit, if any."},"cacheTtlMilliseconds":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How long connector responses may be cached, in milliseconds."},"integrationSlug":{"type":"string","description":"Integration this connector is an instance of."},"isDefault":{"type":"boolean","description":"Whether this is the workspace's default connector for its integration."},"playsCount":{"type":"number","description":"Number of plays that use this connector."},"toolsCount":{"type":"number","description":"Number of tools that use this connector."},"modelsCount":{"type":"number","description":"Number of models that use this connector."},"createdAt":{"description":"Time this connector was created.","type":"string"},"updatedAt":{"description":"Time this connector was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this connector was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","slug","rateLimit","cacheTtlMilliseconds","integrationSlug","isDefault","playsCount","toolsCount","modelsCount","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"useCredits":{"type":"boolean","description":"Connector bills usage against workspace credits.","enum":[true]},"config":{"type":"null","description":"Credentials are omitted when the connector uses credits."}},"required":["useCredits","config"],"additionalProperties":false},{"type":"object","properties":{"useCredits":{"type":"boolean","description":"Connector uses its own credentials instead of workspace credits.","enum":[false]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector credentials and settings."}},"required":["useCredits","config"],"additionalProperties":false}]}]},"title":"Connectors","description":"List of connectors."}},"required":["connectors"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/connectors/{uuid}/autocomplete":{"post":{"operationId":"postConnectionConnectorsByUuidAutocomplete","summary":"Autocomplete connectors","description":"Get connector autocomplete suggestions (POST /connection/connectors/{uuid}/autocomplete).","tags":["Connection - Connectors"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Connector identifier."},"required":true,"description":"Connector identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","title":"Slug","description":"Autocomplete field slug."},"value":{"title":"Value","description":"Current value for autocomplete."},"params":{"title":"Params","description":"Parameters for autocomplete evaluation."},"refresh":{"title":"Refresh","description":"Whether to refresh autocomplete results.","type":"boolean"},"variables":{"title":"Variables","description":"Variables available to autocomplete evaluation."}},"required":["slug","params"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Autocomplete connectors","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"Display label shown for this suggestion."},"value":{"type":"string","description":"Value submitted when this suggestion is selected."},"parent":{"description":"Parent grouping this suggestion belongs to, if any.","type":"string"},"description":{"description":"Extra text explaining this suggestion, if any.","type":"string"},"configOverride":{"description":"Config fields to apply when this suggestion is selected.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["label","value"],"additionalProperties":false},"title":"Results","description":"Autocomplete results."}},"required":["results"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/connectors/existsBySlug":{"get":{"operationId":"getConnectionConnectorsExistsBySlug","summary":"Check connector exists by slug","description":"Check if a connector exists by its slug (GET /connection/connectors/existsBySlug).","tags":["Connection - Connectors"],"parameters":[{"in":"query","name":"slug","schema":{"type":"string","minLength":1,"maxLength":63,"title":"Slug","description":"Connector slug to check."},"required":true,"description":"Connector slug to check."}],"responses":{"200":{"description":"Check connector exists by slug","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean","title":"Exists","description":"Whether the connector exists."}},"required":["exists"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/connectors/{uuid}":{"get":{"operationId":"getConnectionConnectorsByUuid","summary":"Get connector","description":"Get a connector by UUID (GET /connection/connectors/{uuid}).","tags":["Connection - Connectors"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Connector identifier."},"required":true,"description":"Connector identifier."}],"responses":{"200":{"description":"Get connector","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"connector":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Connector identifier."},"workspaceUuid":{"type":"string","description":"Workspace this connector belongs to."},"userUuid":{"type":"string","description":"User who created this connector."},"name":{"type":"string","description":"Connector display name."},"slug":{"type":"string","description":"URL-safe identifier for this connector."},"rateLimit":{"anyOf":[{"type":"object","properties":{"unit":{"type":"string","enum":["day","hour","minute","second"],"description":"Time window the rate limit applies to."},"max":{"type":"number","description":"Maximum number of calls allowed in the window."}},"required":["unit","max"],"additionalProperties":false},{"type":"null"}],"description":"Per-connector call limit, if any."},"cacheTtlMilliseconds":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How long connector responses may be cached, in milliseconds."},"integrationSlug":{"type":"string","description":"Integration this connector is an instance of."},"isDefault":{"type":"boolean","description":"Whether this is the workspace's default connector for its integration."},"playsCount":{"type":"number","description":"Number of plays that use this connector."},"toolsCount":{"type":"number","description":"Number of tools that use this connector."},"modelsCount":{"type":"number","description":"Number of models that use this connector."},"createdAt":{"description":"Time this connector was created.","type":"string"},"updatedAt":{"description":"Time this connector was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this connector was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","slug","rateLimit","cacheTtlMilliseconds","integrationSlug","isDefault","playsCount","toolsCount","modelsCount","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"useCredits":{"type":"boolean","description":"Connector bills usage against workspace credits.","enum":[true]},"config":{"type":"null","description":"Credentials are omitted when the connector uses credits."}},"required":["useCredits","config"],"additionalProperties":false},{"type":"object","properties":{"useCredits":{"type":"boolean","description":"Connector uses its own credentials instead of workspace credits.","enum":[false]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector credentials and settings."}},"required":["useCredits","config"],"additionalProperties":false}]}],"title":"Connector","description":"Connector details."}},"required":["connector"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putConnectionConnectorsByUuid","summary":"Update connector","description":"Update a connector (PUT /connection/connectors/{uuid}).","tags":["Connection - Connectors"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Connector identifier."},"required":true,"description":"Connector identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Connector name.","type":"string","minLength":1,"maxLength":255},"isDefault":{"title":"Is default","description":"Whether this connector is the default for its integration. Setting it to true clears the previous default.","type":"boolean"},"config":{"title":"Config","description":"Connector configuration.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"rateLimit":{"title":"Rate limit","description":"Rate limit configuration.","anyOf":[{"type":"object","properties":{"unit":{"type":"string","enum":["day","hour","minute","second"],"title":"Unit","description":"Rate limit time unit."},"max":{"type":"number","title":"Max","description":"Maximum requests per unit."},"strategy":{"type":"string","enum":["spread","burst"],"title":"Strategy","description":"Rate limit strategy: spread requests evenly or allow burst then wait."}},"required":["unit","max","strategy"]},{"type":"null"}]},"cacheTtlMilliseconds":{"title":"Cache TTL milliseconds","description":"Cache time-to-live in milliseconds.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update connector","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"connector":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Connector identifier."},"workspaceUuid":{"type":"string","description":"Workspace this connector belongs to."},"userUuid":{"type":"string","description":"User who created this connector."},"name":{"type":"string","description":"Connector display name."},"slug":{"type":"string","description":"URL-safe identifier for this connector."},"rateLimit":{"anyOf":[{"type":"object","properties":{"unit":{"type":"string","enum":["day","hour","minute","second"],"description":"Time window the rate limit applies to."},"max":{"type":"number","description":"Maximum number of calls allowed in the window."}},"required":["unit","max"],"additionalProperties":false},{"type":"null"}],"description":"Per-connector call limit, if any."},"cacheTtlMilliseconds":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How long connector responses may be cached, in milliseconds."},"integrationSlug":{"type":"string","description":"Integration this connector is an instance of."},"isDefault":{"type":"boolean","description":"Whether this is the workspace's default connector for its integration."},"playsCount":{"type":"number","description":"Number of plays that use this connector."},"toolsCount":{"type":"number","description":"Number of tools that use this connector."},"modelsCount":{"type":"number","description":"Number of models that use this connector."},"createdAt":{"description":"Time this connector was created.","type":"string"},"updatedAt":{"description":"Time this connector was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this connector was deleted, if it has been."}},"required":["uuid","workspaceUuid","userUuid","name","slug","rateLimit","cacheTtlMilliseconds","integrationSlug","isDefault","playsCount","toolsCount","modelsCount","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"useCredits":{"type":"boolean","description":"Connector bills usage against workspace credits.","enum":[true]},"config":{"type":"null","description":"Credentials are omitted when the connector uses credits."}},"required":["useCredits","config"],"additionalProperties":false},{"type":"object","properties":{"useCredits":{"type":"boolean","description":"Connector uses its own credentials instead of workspace credits.","enum":[false]},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connector credentials and settings."}},"required":["useCredits","config"],"additionalProperties":false}]}],"title":"Connector","description":"Updated connector details."}},"required":["connector"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteConnectionConnectorsByUuid","summary":"Remove connector","description":"Remove a connector (DELETE /connection/connectors/{uuid}).","tags":["Connection - Connectors"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Connector identifier."},"required":true,"description":"Connector identifier."}],"responses":{"200":{"description":"Remove connector","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/connectors/{uuid}/dynamicSchemas/{slug}":{"post":{"operationId":"postConnectionConnectorsByUuidDynamicSchemasBySlug","summary":"Get dynamic schema","description":"Get dynamic schema for a connector (POST /connection/connectors/{uuid}/dynamicSchemas/{slug}).","tags":["Connection - Connectors"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Connector identifier."},"required":true,"description":"Connector identifier."},{"in":"path","name":"slug","schema":{"type":"string","title":"Slug","description":"Dynamic schema slug."},"required":true,"description":"Dynamic schema slug."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"params":{"title":"Params","description":"Parameters for schema generation."}},"required":["params"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Get dynamic schema","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"title":"Schema","description":"Generated JSON schema."},"uiSchema":{"title":"UI schema","description":"Generated UI schema.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/connectors/{uuid}/languageModels":{"get":{"operationId":"getConnectionConnectorsByUuidLanguageModels","summary":"Get language models","description":"Get the language models available for a connector (GET /connection/connectors/{uuid}/languageModels).","tags":["Connection - Connectors"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Connector identifier."},"required":true,"description":"Connector identifier."}],"responses":{"200":{"description":"Get language models","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"languageModels":{"type":"array","items":{},"title":"Language models","description":"Available language models for the connector."}},"required":["languageModels"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/customIntegrations":{"post":{"operationId":"postConnectionCustomIntegrations","summary":"Create custom integration","description":"Create a new custom integration (POST /connection/customIntegrations).","tags":["Connection - Custom Integrations"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Discriminator for an externally hosted custom integration.","enum":["external"]},"baseUrl":{"type":"string","format":"uri","title":"Base URL","description":"Base URL for an externally hosted custom integration."}},"required":["kind","baseUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Discriminator for a worker-backed custom integration.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Worker UUID","description":"Identifier of the hosting worker to back the integration."}},"required":["kind","workerUuid"],"additionalProperties":false}],"title":"Request body","description":"Request body schema.","type":"object"}}}},"responses":{"200":{"description":"Create custom integration","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"customIntegration":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Custom integration identifier."},"workspaceUuid":{"type":"string","description":"Workspace this custom integration belongs to."},"slug":{"type":"string","description":"URL-safe identifier for this custom integration."},"createdAt":{"description":"Time this custom integration was created.","type":"string"},"updatedAt":{"description":"Time this custom integration was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this custom integration was deleted, if it has been."}},"required":["uuid","workspaceUuid","slug","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Custom integration hosted at an external HTTP base URL.","enum":["external"]},"baseUrl":{"type":"string","description":"Base URL used to reach the external integration."}},"required":["kind","baseUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Custom integration served by a Cargo worker.","enum":["worker"]},"workerUuid":{"type":"string","description":"Worker that serves this custom integration."}},"required":["kind","workerUuid"],"additionalProperties":false}],"type":"object"}],"title":"Custom integration","description":"Custom integration details."}},"required":["customIntegration"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/customIntegrations/list":{"get":{"operationId":"getConnectionCustomIntegrationsList","summary":"List custom integrations","description":"List all custom integrations (GET /connection/customIntegrations/list).","tags":["Connection - Custom Integrations"],"responses":{"200":{"description":"List custom integrations","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"customIntegrations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Custom integration identifier."},"workspaceUuid":{"type":"string","description":"Workspace this custom integration belongs to."},"slug":{"type":"string","description":"URL-safe identifier for this custom integration."},"createdAt":{"description":"Time this custom integration was created.","type":"string"},"updatedAt":{"description":"Time this custom integration was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this custom integration was deleted, if it has been."}},"required":["uuid","workspaceUuid","slug","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Custom integration hosted at an external HTTP base URL.","enum":["external"]},"baseUrl":{"type":"string","description":"Base URL used to reach the external integration."}},"required":["kind","baseUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Custom integration served by a Cargo worker.","enum":["worker"]},"workerUuid":{"type":"string","description":"Worker that serves this custom integration."}},"required":["kind","workerUuid"],"additionalProperties":false}],"type":"object"}]},"title":"Custom integrations","description":"List of custom integrations."}},"required":["customIntegrations"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/customIntegrations/{uuid}":{"get":{"operationId":"getConnectionCustomIntegrationsByUuid","summary":"Get custom integration","description":"Get a custom integration by UUID (GET /connection/customIntegrations/{uuid}).","tags":["Connection - Custom Integrations"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Custom integration identifier."},"required":true,"description":"Custom integration identifier."}],"responses":{"200":{"description":"Get custom integration","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"connector":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Custom integration identifier."},"workspaceUuid":{"type":"string","description":"Workspace this custom integration belongs to."},"slug":{"type":"string","description":"URL-safe identifier for this custom integration."},"createdAt":{"description":"Time this custom integration was created.","type":"string"},"updatedAt":{"description":"Time this custom integration was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this custom integration was deleted, if it has been."}},"required":["uuid","workspaceUuid","slug","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Custom integration hosted at an external HTTP base URL.","enum":["external"]},"baseUrl":{"type":"string","description":"Base URL used to reach the external integration."}},"required":["kind","baseUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Custom integration served by a Cargo worker.","enum":["worker"]},"workerUuid":{"type":"string","description":"Worker that serves this custom integration."}},"required":["kind","workerUuid"],"additionalProperties":false}],"type":"object"}],"title":"Custom integration","description":"Custom integration details."}},"required":["connector"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putConnectionCustomIntegrationsByUuid","summary":"Update custom integration","description":"Update a custom integration (PUT /connection/customIntegrations/{uuid}).","tags":["Connection - Custom Integrations"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Custom integration identifier."},"required":true,"description":"Custom integration identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"baseUrl":{"title":"Base URL","description":"Base URL for an externally hosted custom integration.","type":"string","format":"uri"},"workerUuid":{"title":"Worker UUID","description":"Identifier of the hosting worker to back the integration.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update custom integration","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"customIntegration":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Custom integration identifier."},"workspaceUuid":{"type":"string","description":"Workspace this custom integration belongs to."},"slug":{"type":"string","description":"URL-safe identifier for this custom integration."},"createdAt":{"description":"Time this custom integration was created.","type":"string"},"updatedAt":{"description":"Time this custom integration was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this custom integration was deleted, if it has been."}},"required":["uuid","workspaceUuid","slug","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Custom integration hosted at an external HTTP base URL.","enum":["external"]},"baseUrl":{"type":"string","description":"Base URL used to reach the external integration."}},"required":["kind","baseUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Custom integration served by a Cargo worker.","enum":["worker"]},"workerUuid":{"type":"string","description":"Worker that serves this custom integration."}},"required":["kind","workerUuid"],"additionalProperties":false}],"type":"object"}],"title":"Custom integration","description":"Updated custom integration details."}},"required":["customIntegration"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteConnectionCustomIntegrationsByUuid","summary":"Remove custom integration","description":"Remove a custom integration (DELETE /connection/customIntegrations/{uuid}).","tags":["Connection - Custom Integrations"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Custom integration identifier."},"required":true,"description":"Custom integration identifier."}],"responses":{"200":{"description":"Remove custom integration","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/integrations/list":{"get":{"operationId":"getConnectionIntegrationsList","summary":"List integrations","description":"List all available integrations (GET /connection/integrations/list).","tags":["Connection - Integrations"],"parameters":[{"in":"query","name":"category","schema":{"title":"Category","description":"Filter integrations by category.","type":"string"},"description":"Filter integrations by category."},{"in":"query","name":"slugs","schema":{"title":"Slugs","description":"Filter integrations by a set of slugs.","type":"array","items":{"type":"string"}},"description":"Filter integrations by a set of slugs."},{"in":"query","name":"search","schema":{"title":"Search","description":"Search integrations by name (case-insensitive partial match).","type":"string"},"description":"Search integrations by name (case-insensitive partial match)."},{"in":"query","name":"hasActions","schema":{"title":"Has actions","description":"Filter integrations that have at least one action.","type":"string","enum":["true","false"]},"description":"Filter integrations that have at least one action."},{"in":"query","name":"hasExtractors","schema":{"title":"Has extractors","description":"Filter integrations that have at least one extractor.","type":"string","enum":["true","false"]},"description":"Filter integrations that have at least one extractor."}],"responses":{"200":{"description":"List integrations","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"integrations":{"type":"array","items":{},"title":"Integrations","description":"List of integrations."}},"required":["integrations"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/integrations/{slug}":{"get":{"operationId":"getConnectionIntegrationsBySlug","summary":"Get integration","description":"Get an integration by slug (GET /connection/integrations/{slug}).","tags":["Connection - Integrations"],"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug","description":"Integration slug."},"required":true,"description":"Integration slug."}],"responses":{"200":{"description":"Get integration","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"integration":{"title":"Integration","description":"Integration details."}},"required":["integration"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/integrations/{slug}/documentation":{"get":{"operationId":"getConnectionIntegrationsBySlugDocumentation","summary":"Get integration documentation","description":"Get the documentation for an integration (GET /connection/integrations/{slug}/documentation).","tags":["Connection - Integrations"],"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug","description":"Integration slug."},"required":true,"description":"Integration slug."}],"responses":{"200":{"description":"Get integration documentation","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"errorMessage":{"type":"string","title":"Error message","description":"Error message when the request fails."}},"required":["errorMessage"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","enum":["integrationNotFound","documentationNotFound"],"title":"Reason","description":"Failure reason."}},"required":["reason"],"additionalProperties":false}],"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/integrations/{slug}/completeOauth":{"post":{"operationId":"postConnectionIntegrationsBySlugCompleteOauth","summary":"Complete OAuth","description":"Complete OAuth flow for an integration (POST /connection/integrations/{slug}/completeOauth).","tags":["Connection - Integrations"],"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug","description":"Integration slug."},"required":true,"description":"Integration slug."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"params":{"title":"Params","description":"OAuth parameters to complete the flow."}},"required":["params"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Complete OAuth","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","title":"Value","description":"OAuth completion result value."},"extraValues":{"title":"Extra values","description":"Additional values returned by the OAuth flow (e.g. user tokens).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["value"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/integrations/{slug}/initiateOauth":{"post":{"operationId":"postConnectionIntegrationsBySlugInitiateOauth","summary":"Initiate OAuth","description":"Initiate the OAuth flow for an integration and return a consent URL. (POST /connection/integrations/{slug}/initiateOauth).","tags":["Connection - Integrations"],"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug","description":"Integration slug."},"required":true,"description":"Integration slug."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Initiate OAuth","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"consentUrl":{"type":"string","title":"Consent URL","description":"URL to redirect the user to in order to authorize."}},"required":["consentUrl"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/connection/nativeIntegrations":{"get":{"operationId":"getConnectionNativeIntegrations","summary":"Get native integration","description":"Get the native integration (GET /connection/nativeIntegrations).","tags":["Connection - Native Integrations"],"responses":{"200":{"description":"Get native integration","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"nativeIntegration":{"type":"object","properties":{"actions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Actions","description":"Available native integration actions."},"extractors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Extractors","description":"Available native integration extractors."}},"required":["actions","extractors"],"additionalProperties":false,"title":"Native integration","description":"Native integration details."}},"required":["nativeIntegration"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/content/files/upload":{"post":{"operationId":"postContentFilesUpload","summary":"Upload file","description":"Upload a workspace file for RAG and agent resources (POST /content/files/upload).","tags":["Content - Files"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderUuid":{"title":"Folder UUID","description":"Folder identifier to upload into.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"uuid":{"title":"File UUID","description":"When set, replace this file's content in place (keeping its uuid) instead of creating a new file. Ignored if no file with this uuid exists.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Upload file","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"libraryUuid":{"type":"string"},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"isTemporary":{"type":"boolean"},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"s3Filename":{"type":"string"},"openAiFileId":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"isIndexedInOpenAiVectorStore":{"type":"boolean"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["uuid","workspaceUuid","libraryUuid","userUuid","name","isTemporary","folderUuid","s3Filename","openAiFileId","contentType","size","isIndexedInOpenAiVectorStore","externalId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connectorUuid":{"type":"string"}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}]},"title":"Files","description":"Uploaded files."}},"required":["files"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/content/files/list":{"get":{"operationId":"getContentFilesList","summary":"List files","description":"List workspace files (GET /content/files/list).","tags":["Content - Files"],"parameters":[{"in":"query","name":"folderUuid","schema":{"title":"Folder UUID","description":"Filter files by folder identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter files by folder identifier."},{"in":"query","name":"libraryUuid","schema":{"title":"Library UUID","description":"Filter files by library identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter files by library identifier."},{"in":"query","name":"connectorUuid","schema":{"title":"Connector UUID","description":"Filter files by connector identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter files by connector identifier."},{"in":"query","name":"kind","schema":{"title":"Kind","description":"Filter files by kind.","type":"string","enum":["connector","native"]},"description":"Filter files by kind."}],"responses":{"200":{"description":"List files","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"libraryUuid":{"type":"string"},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"isTemporary":{"type":"boolean"},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"s3Filename":{"type":"string"},"openAiFileId":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"isIndexedInOpenAiVectorStore":{"type":"boolean"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["uuid","workspaceUuid","libraryUuid","userUuid","name","isTemporary","folderUuid","s3Filename","openAiFileId","contentType","size","isIndexedInOpenAiVectorStore","externalId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connectorUuid":{"type":"string"}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}]},"title":"Files","description":"List of files."}},"required":["files"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/content/files/{uuid}":{"get":{"operationId":"getContentFilesByUuid","summary":"Get file","description":"Get a workspace file by UUID (GET /content/files/{uuid}).","tags":["Content - Files"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"File identifier."},"required":true,"description":"File identifier."}],"responses":{"200":{"description":"Get file","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"libraryUuid":{"type":"string"},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"isTemporary":{"type":"boolean"},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"s3Filename":{"type":"string"},"openAiFileId":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"isIndexedInOpenAiVectorStore":{"type":"boolean"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["uuid","workspaceUuid","libraryUuid","userUuid","name","isTemporary","folderUuid","s3Filename","openAiFileId","contentType","size","isIndexedInOpenAiVectorStore","externalId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connectorUuid":{"type":"string"}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"File","description":"File details."}},"required":["file"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putContentFilesByUuid","summary":"Update file","description":"Update a workspace file (PUT /content/files/{uuid}).","tags":["Content - Files"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"File identifier."},"required":true,"description":"File identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"File name.","type":"string","minLength":1,"maxLength":255},"folderUuid":{"title":"Folder UUID","description":"Folder identifier to move the file into.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update file","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"libraryUuid":{"type":"string"},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"isTemporary":{"type":"boolean"},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"s3Filename":{"type":"string"},"openAiFileId":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"isIndexedInOpenAiVectorStore":{"type":"boolean"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["uuid","workspaceUuid","libraryUuid","userUuid","name","isTemporary","folderUuid","s3Filename","openAiFileId","contentType","size","isIndexedInOpenAiVectorStore","externalId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connectorUuid":{"type":"string"}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"File","description":"Updated file details."}},"required":["file"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteContentFilesByUuid","summary":"Remove file","description":"Remove a workspace file (DELETE /content/files/{uuid}).","tags":["Content - Files"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"File identifier."},"required":true,"description":"File identifier."}],"responses":{"200":{"description":"Remove file","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/content/files/{uuid}/raw":{"get":{"operationId":"getContentFilesByUuidRaw","summary":"Get file bytes","description":"Stream a workspace file's raw bytes for inline preview (capped at 10 MB) (GET /content/files/{uuid}/raw).","tags":["Content - Files"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"File identifier."},"required":true,"description":"File identifier."}],"responses":{"200":{"description":"Get file bytes","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"errorMessage":{"type":"string","title":"Error message","description":"Error message when the request fails."}},"required":["errorMessage"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","enum":["fileNotFound"],"title":"Reason","description":"Failure reason."}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","enum":["tooLarge"],"title":"Reason","description":"Failure reason."},"sizeBytes":{"type":"number","title":"Size in bytes","description":"The file's size, which exceeds the preview cap."}},"required":["reason","sizeBytes"],"additionalProperties":false}],"title":"Response body","description":"Response body schema (failure branches only)."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/content/libraries/create":{"post":{"operationId":"postContentLibrariesCreate","summary":"Create library","description":"Create a connector file library (POST /content/libraries/create).","tags":["Content - Libraries"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Library name."},"extractorSlug":{"type":"string","minLength":1,"maxLength":63,"title":"Extractor slug","description":"Unstructured extractor identifier."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Config","description":"Library configuration."},"connectorUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Connector UUID","description":"Connector identifier."},"folderUuid":{"title":"Folder UUID","description":"Default folder for synced files.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["name","extractorSlug","config","connectorUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create library","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"library":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"name":{"type":"string"},"extractorSlug":{"type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["uuid","workspaceUuid","name","extractorSlug","config","folderUuid","lastSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connectorUuid":{"type":"string"}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"Library","description":"Created library details."}},"required":["library"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/content/libraries/list":{"get":{"operationId":"getContentLibrariesList","summary":"List libraries","description":"List workspace libraries (GET /content/libraries/list).","tags":["Content - Libraries"],"parameters":[{"in":"query","name":"connectorUuid","schema":{"title":"Connector UUID","description":"Filter libraries by connector identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter libraries by connector identifier."},{"in":"query","name":"kind","schema":{"title":"Kind","description":"Filter libraries by kind.","type":"string","enum":["connector","native"]},"description":"Filter libraries by kind."}],"responses":{"200":{"description":"List libraries","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"libraries":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"name":{"type":"string"},"extractorSlug":{"type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["uuid","workspaceUuid","name","extractorSlug","config","folderUuid","lastSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connectorUuid":{"type":"string"}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}]},"title":"Libraries","description":"List of libraries."}},"required":["libraries"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/content/libraries/{uuid}":{"get":{"operationId":"getContentLibrariesByUuid","summary":"Get library","description":"Get a workspace library by UUID (GET /content/libraries/{uuid}).","tags":["Content - Libraries"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Library identifier."},"required":true,"description":"Library identifier."}],"responses":{"200":{"description":"Get library","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"library":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"name":{"type":"string"},"extractorSlug":{"type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["uuid","workspaceUuid","name","extractorSlug","config","folderUuid","lastSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connectorUuid":{"type":"string"}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"Library","description":"Library details."}},"required":["library"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"operationId":"patchContentLibrariesByUuid","summary":"Update library","description":"Update a workspace library (PATCH /content/libraries/{uuid}).","tags":["Content - Libraries"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Library identifier."},"required":true,"description":"Library identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Library name.","type":"string","minLength":1,"maxLength":255},"config":{"title":"Config","description":"Library configuration.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"folderUuid":{"title":"Folder UUID","description":"Default folder for synced files.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update library","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"library":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"name":{"type":"string"},"extractorSlug":{"type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["uuid","workspaceUuid","name","extractorSlug","config","folderUuid","lastSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connectorUuid":{"type":"string"}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"Library","description":"Updated library details."}},"required":["library"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteContentLibrariesByUuid","summary":"Remove library","description":"Remove a workspace library (DELETE /content/libraries/{uuid}).","tags":["Content - Libraries"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Library identifier."},"required":true,"description":"Library identifier."}],"responses":{"200":{"description":"Remove library","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","title":"Success","description":"Library removed successfully.","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/context/graph":{"get":{"operationId":"getContextGraph","summary":"Get context graph","description":"Get the knowledge graph of the workspace context repository: nodes for markdown files and edges for links between them. (GET /context/graph).","tags":["Context - Graph"],"responses":{"200":{"description":"Get context graph","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","title":"Node id (file path)"},"title":{"type":"string","title":"Title"},"summary":{"title":"Summary","type":"string"},"cluster":{"type":"string","title":"Cluster (top-level folder)"}},"required":["id","title","cluster"],"additionalProperties":false,"title":"Graph node"},"title":"Nodes"},"edges":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","title":"Source node id"},"target":{"type":"string","title":"Target node id"},"origin":{"type":"string","enum":["frontmatter","wikilink","mdlink"],"title":"Edge origin"}},"required":["source","target","origin"],"additionalProperties":false,"title":"Graph edge"},"title":"Edges"},"broken":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","title":"Source node id"},"target":{"type":"string","title":"Unresolved target"},"origin":{"type":"string","enum":["frontmatter","wikilink","mdlink"],"title":"Edge origin"}},"required":["source","target","origin"],"additionalProperties":false,"title":"Broken edge"},"title":"Broken edges"},"computedAt":{"type":"string","title":"Computed at (ISO)"}},"required":["nodes","edges","broken","computedAt"],"additionalProperties":false,"title":"Graph"}},"required":["graph"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/context/repository":{"get":{"operationId":"getContextRepository","summary":"Get context repository","description":"Get the context repository configuration for the current workspace. (GET /context/repository).","tags":["Context - Repository"],"responses":{"200":{"description":"Get context repository","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"repository":{"type":"object","properties":{"uuid":{"type":"string"},"workspaceUuid":{"type":"string"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["managed"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["custom"]},"connectorUuid":{"type":"string"},"repositoryOwner":{"type":"string"},"repositoryName":{"type":"string"},"defaultBranch":{"type":"string"}},"required":["kind","connectorUuid","repositoryOwner","repositoryName","defaultBranch"],"additionalProperties":false}],"type":"object"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["uuid","workspaceUuid","source","createdAt","updatedAt"],"additionalProperties":false,"title":"Repository","description":"The context repository configuration."}},"required":["repository"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/context/runtime":{"get":{"operationId":"getContextRuntime","summary":"Browse runtime sandbox","description":"List entries at a path in the workspace runtime sandbox. Omit `path` to list the root, or pass `depth=-1` (with no `path`) to fetch the entire repository tree from the configured default branch on GitHub in one call. (GET /context/runtime).","tags":["Context - Runtime"],"parameters":[{"in":"query","name":"path","schema":{"title":"Path","description":"Optional path to browse, relative to the workspace working directory. Omit to list the root.","type":"string"},"description":"Optional path to browse, relative to the workspace working directory. Omit to list the root."},{"in":"query","name":"depth","schema":{"title":"Depth","description":"Recursion depth. Omit (or pass `1`) to list a single directory level via the runtime sandbox. Pass `-1` together with no `path` to fetch the entire repository tree from the configured default branch on GitHub in one call.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Recursion depth. Omit (or pass `1`) to list a single directory level via the runtime sandbox. Pass `-1` together with no `path` to fetch the entire repository tree from the configured default branch on GitHub in one call."}],"responses":{"200":{"description":"Browse runtime sandbox","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","title":"Path"},"entries":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path","description":"Repository-relative path. For single-level browses this is `${parent}/${name}`; for the recursive GitHub view it is the full path returned by the Trees API."},"kind":{"type":"string","enum":["file","folder"],"title":"Kind"}},"required":["name","path","kind"],"additionalProperties":false},"title":"Entries","description":"Files and folders at the requested path."},"truncated":{"title":"Truncated","description":"Set to `true` only on the recursive GitHub view when the upstream tree response was truncated past GitHub's 100k-entries / 7 MB cap.","type":"boolean"}},"required":["path","entries"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/context/runtime/raw":{"get":{"operationId":"getContextRuntimeRaw","summary":"Read runtime sandbox file as raw bytes","description":"Stream the raw bytes of a file from the workspace context repository's default branch on GitHub, with a resolved `Content-Type` header. Used by the file viewer for binary previews (images, PDFs). (GET /context/runtime/raw).","tags":["Context - Runtime"],"parameters":[{"in":"query","name":"path","schema":{"type":"string","minLength":1,"title":"Path","description":"Repository-relative path of the file to fetch. The response is the raw bytes from the configured default branch on GitHub."},"required":true,"description":"Repository-relative path of the file to fetch. The response is the raw bytes from the configured default branch on GitHub."}],"responses":{"200":{"description":"Read runtime sandbox file as raw bytes","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","title":"Error reason","enum":["repositoryNotFound"]}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","title":"Error reason","enum":["fileNotFound"]}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","title":"Error reason","enum":["tooLarge"]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"title":"Size bytes","description":"Underlying file size in bytes. The runtime caps reads at 10 MB."}},"required":["reason","sizeBytes"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","title":"Error reason","enum":["invalidQuery"]}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","title":"Error reason","enum":["unknown"]},"errorMessage":{"type":"string","title":"Error message"}},"required":["reason","errorMessage"],"additionalProperties":false}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/context/runtime/content":{"post":{"operationId":"postContextRuntimeContent","summary":"Read runtime sandbox file","description":"Read a UTF-8 file from the workspace runtime sandbox. Returns the file content. (POST /context/runtime/content).","tags":["Context - Runtime"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1,"title":"Path","description":"Path of the file to read in the runtime sandbox, relative to the workspace working directory."},"startLine":{"title":"Start line","description":"1-indexed inclusive line at which to start reading. Defaults to the first line of the file.","type":"integer","minimum":1,"maximum":9007199254740991},"endLine":{"title":"End line","description":"1-indexed inclusive line at which to stop reading. Defaults to the last line of the file. Must be greater than or equal to `startLine` when both are provided.","type":"integer","minimum":1,"maximum":9007199254740991}},"required":["path"],"additionalProperties":false,"title":"Request body","description":"Read a file from the workspace runtime sandbox."}}}},"responses":{"200":{"description":"Read runtime sandbox file","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","title":"Path"},"content":{"type":"string","title":"Content","description":"UTF-8 decoded content of the requested line range."},"startLine":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"title":"Start line","description":"1-indexed inclusive start line of the returned slice (after clamping to the file's bounds)."},"endLine":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"title":"End line","description":"1-indexed inclusive end line of the returned slice. Equals `startLine - 1` when the requested range starts past the end of the file."},"totalLines":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"title":"Total lines","description":"Total number of lines in the underlying file."}},"required":["path","content","startLine","endLine","totalLines"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putContextRuntimeContent","summary":"Write runtime sandbox file","description":"Create or overwrite a file in the workspace runtime sandbox and push the change to the workspace's default branch on GitHub. (PUT /context/runtime/content).","tags":["Context - Runtime"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1,"title":"Path","description":"Path of the file to write, relative to the workspace working directory."},"content":{"type":"string","title":"Content","description":"Full UTF-8 content to write."},"commitMessage":{"title":"Commit message","description":"Optional commit message override. Defaults to 'context(runtime): write <path>'.","type":"string","minLength":1}},"required":["path","content"],"additionalProperties":false,"title":"Request body","description":"Write a file in the workspace runtime sandbox and push the change to the default branch."}}}},"responses":{"200":{"description":"Write runtime sandbox file","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"commit":{"type":"object","properties":{"sha":{"type":"string","title":"SHA"},"message":{"type":"string","title":"Message"}},"required":["sha","message"],"additionalProperties":false,"title":"Commit"}},"required":["commit"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"operationId":"patchContextRuntimeContent","summary":"Edit runtime sandbox file","description":"Replace occurrences of `oldString` with `newString` in a file in the workspace runtime sandbox, then push the change to the workspace's default branch on GitHub. By default `oldString` must occur exactly once; pass `replaceAll: true` to replace every occurrence. (PATCH /context/runtime/content).","tags":["Context - Runtime"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1,"title":"Path","description":"Path of the file to edit, relative to the workspace working directory."},"oldString":{"type":"string","minLength":1,"title":"Old string","description":"The exact substring to replace. Must occur exactly once unless `replaceAll` is `true`."},"newString":{"type":"string","title":"New string","description":"Replacement string. May be empty to delete the match. Must differ from `oldString`."},"replaceAll":{"title":"Replace all","description":"When `true`, replace every occurrence of `oldString` instead of requiring a single match.","type":"boolean"},"commitMessage":{"title":"Commit message","description":"Optional commit message override. Defaults to 'context(runtime): edit <path>'.","type":"string","minLength":1}},"required":["path","oldString","newString"],"additionalProperties":false,"title":"Request body","description":"Edit a file in the workspace runtime sandbox via string replacement, then push the change to the default branch."}}}},"responses":{"200":{"description":"Edit runtime sandbox file","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"commit":{"type":"object","properties":{"sha":{"type":"string","title":"SHA"},"message":{"type":"string","title":"Message"}},"required":["sha","message"],"additionalProperties":false,"title":"Commit"}},"required":["commit"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/context/runtime/execute":{"post":{"operationId":"postContextRuntimeExecute","summary":"Execute in runtime sandbox","description":"Run a shell command in the workspace runtime sandbox. Tracked working-tree changes the command produced (additions, edits, deletions, renames) are auto-committed and pushed to the workspace's default branch as a single commit. Pass `commitMessage` to customize the commit subject; gitignored paths are skipped. The response's `commit` field is present iff a commit landed. (POST /context/runtime/execute).","tags":["Context - Runtime"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string","minLength":1,"title":"Command","description":"Shell command to run inside the runtime sandbox."},"args":{"title":"Arguments","description":"Optional arguments passed to the command.","type":"array","items":{"type":"string"}},"commitMessage":{"title":"Commit message","description":"Optional override for the auto-commit message. When the command leaves uncommitted changes (additions, edits, deletions, renames) in the working tree, those changes are always pushed to the workspace repo's default branch as a single commit; this field only customizes the commit subject. Defaults to `context(runtime): execute <command>`.","type":"string","minLength":1}},"required":["command"],"additionalProperties":false,"title":"Request body","description":"Run a shell command in the workspace runtime sandbox. Tracked working-tree changes are auto-committed and pushed to the workspace's default branch; gitignored paths are skipped."}}}},"responses":{"200":{"description":"Execute in runtime sandbox","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"exitCode":{"type":"number","title":"Exit code"},"stdout":{"type":"string","title":"Stdout"},"stderr":{"type":"string","title":"Stderr"},"commit":{"title":"Commit","description":"Present iff the command left the working tree dirty AND the resulting auto-push landed on the default branch. Absent when the command produced no tracked changes or when the push didn't land — the server logs capture the reason in the latter case.","type":"object","properties":{"sha":{"type":"string","title":"SHA"},"message":{"type":"string","title":"Message"}},"required":["sha","message"],"additionalProperties":false}},"required":["exitCode","stdout","stderr"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/domainManagement/domains":{"get":{"operationId":"getDomainManagementDomains","summary":"List domains","description":"List the workspace's managed domains (GET /domainManagement/domains).","tags":["Domain Management - Domains"],"parameters":[{"in":"query","name":"statuses","schema":{"title":"Statuses","description":"Optional status filter.","type":"array","items":{"type":"string","enum":["pending","active","failed","cancelled","expired"]}},"description":"Optional status filter."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of domains to return.","type":"integer","exclusiveMinimum":0,"maximum":1000},"description":"Maximum number of domains to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of domains to skip.","type":"integer","minimum":0,"maximum":9007199254740991},"description":"Number of domains to skip."}],"responses":{"200":{"description":"List domains","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this domain belongs to."},"name":{"type":"string","description":"Apex domain name."},"status":{"type":"string","enum":["pending","active","failed","cancelled","expired"],"description":"Current lifecycle status of this domain."},"registrar":{"type":"string","enum":["mailpool"],"description":"Registrar this domain was purchased through."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Registrar metadata stored on this domain."},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"],"description":"DNS record type."},"name":{"type":"string","description":"DNS record hostname."},"value":{"type":"string","description":"DNS record value."},"ttl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Time-to-live for this record in seconds, if set."},"priority":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"MX or SRV priority, if this record type uses one."}},"required":["type","name","value","ttl","priority"],"additionalProperties":false},"description":"DNS records that must be configured for this domain."},"priceCredits":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Credit cost of this domain, if priced."},"billingUsageUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Billing usage record for the purchase or last renewal, if any."},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain registration expires, if known."},"renewalChargedUntil":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End of the last period credits were charged for, if any."},"autoRenew":{"type":"boolean","description":"Whether this domain should renew automatically when it expires."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who purchased this domain."},"createdAt":{"description":"Time this domain was created.","type":"string"},"updatedAt":{"description":"Time this domain was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","status","registrar","meta","dnsRecords","priceCredits","billingUsageUuid","expiresAt","renewalChargedUntil","autoRenew","userUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"Domains","description":"Domains owned by the workspace."}},"required":["domains"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"operationId":"postDomainManagementDomains","summary":"Purchase domain","description":"Purchase a domain; charged in workspace credits (POST /domainManagement/domains).","tags":["Domain Management - Domains"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Domain name to purchase (e.g. acme-outreach.com).","type":"string","minLength":4,"maxLength":253}},"required":["name"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Purchase domain","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this domain belongs to."},"name":{"type":"string","description":"Apex domain name."},"status":{"type":"string","enum":["pending","active","failed","cancelled","expired"],"description":"Current lifecycle status of this domain."},"registrar":{"type":"string","enum":["mailpool"],"description":"Registrar this domain was purchased through."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Registrar metadata stored on this domain."},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"],"description":"DNS record type."},"name":{"type":"string","description":"DNS record hostname."},"value":{"type":"string","description":"DNS record value."},"ttl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Time-to-live for this record in seconds, if set."},"priority":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"MX or SRV priority, if this record type uses one."}},"required":["type","name","value","ttl","priority"],"additionalProperties":false},"description":"DNS records that must be configured for this domain."},"priceCredits":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Credit cost of this domain, if priced."},"billingUsageUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Billing usage record for the purchase or last renewal, if any."},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain registration expires, if known."},"renewalChargedUntil":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End of the last period credits were charged for, if any."},"autoRenew":{"type":"boolean","description":"Whether this domain should renew automatically when it expires."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who purchased this domain."},"createdAt":{"description":"Time this domain was created.","type":"string"},"updatedAt":{"description":"Time this domain was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","status","registrar","meta","dnsRecords","priceCredits","billingUsageUuid","expiresAt","renewalChargedUntil","autoRenew","userUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Domain","description":"Newly purchased domain. The purchase was charged in workspace credits."}},"required":["domain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/domainManagement/domains/search":{"get":{"operationId":"getDomainManagementDomainsSearch","summary":"Search domain","description":"Check a domain name's availability and price in credits (exact match) (GET /domainManagement/domains/search).","tags":["Domain Management - Domains"],"parameters":[{"in":"query","name":"name","schema":{"title":"Name","description":"Domain name to check availability for (e.g. acme-outreach.com).","type":"string","minLength":4,"maxLength":253},"required":true,"description":"Domain name to check availability for (e.g. acme-outreach.com)."}],"responses":{"200":{"description":"Search domain","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"name":{"type":"string","description":"Domain name that was checked."},"available":{"type":"boolean","description":"Whether this domain can be purchased."},"priceCredits":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Credit cost to purchase this domain, if it is available and priced."}},"required":["name","available","priceCredits"],"additionalProperties":false,"title":"Result","description":"Exact-match availability result. Price is expressed in workspace credits. Alternative names are served by the suggestions endpoint."}},"required":["result"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/domainManagement/domains/suggestions":{"get":{"operationId":"getDomainManagementDomainsSuggestions","summary":"Get domain suggestions","description":"Get purchasable alternative domain names for a search (GET /domainManagement/domains/suggestions).","tags":["Domain Management - Domains"],"parameters":[{"in":"query","name":"name","schema":{"title":"Name","description":"Domain name to suggest alternatives for (e.g. acme-outreach.com).","type":"string","minLength":4,"maxLength":253},"required":true,"description":"Domain name to suggest alternatives for (e.g. acme-outreach.com)."}],"responses":{"200":{"description":"Get domain suggestions","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Domain name that was checked."},"available":{"type":"boolean","description":"Whether this domain can be purchased."},"priceCredits":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Credit cost to purchase this domain, if it is available and priced."}},"required":["name","available","priceCredits"],"additionalProperties":false},"title":"Results","description":"Purchasable alternative names. Prices are expressed in workspace credits."}},"required":["results"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/domainManagement/domains/{uuid}":{"get":{"operationId":"getDomainManagementDomainsByUuid","summary":"Get domain","description":"Get a managed domain by UUID (GET /domainManagement/domains/{uuid}).","tags":["Domain Management - Domains"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Domain identifier."},"required":true,"description":"Domain identifier."}],"responses":{"200":{"description":"Get domain","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this domain belongs to."},"name":{"type":"string","description":"Apex domain name."},"status":{"type":"string","enum":["pending","active","failed","cancelled","expired"],"description":"Current lifecycle status of this domain."},"registrar":{"type":"string","enum":["mailpool"],"description":"Registrar this domain was purchased through."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Registrar metadata stored on this domain."},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"],"description":"DNS record type."},"name":{"type":"string","description":"DNS record hostname."},"value":{"type":"string","description":"DNS record value."},"ttl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Time-to-live for this record in seconds, if set."},"priority":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"MX or SRV priority, if this record type uses one."}},"required":["type","name","value","ttl","priority"],"additionalProperties":false},"description":"DNS records that must be configured for this domain."},"priceCredits":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Credit cost of this domain, if priced."},"billingUsageUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Billing usage record for the purchase or last renewal, if any."},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain registration expires, if known."},"renewalChargedUntil":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End of the last period credits were charged for, if any."},"autoRenew":{"type":"boolean","description":"Whether this domain should renew automatically when it expires."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who purchased this domain."},"createdAt":{"description":"Time this domain was created.","type":"string"},"updatedAt":{"description":"Time this domain was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","status","registrar","meta","dnsRecords","priceCredits","billingUsageUuid","expiresAt","renewalChargedUntil","autoRenew","userUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Domain","description":"Domain details."}},"required":["domain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteDomainManagementDomainsByUuid","summary":"Cancel domain","description":"Cancel a managed domain; credits are not refunded (DELETE /domainManagement/domains/{uuid}).","tags":["Domain Management - Domains"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Domain identifier."},"required":true,"description":"Domain identifier."}],"responses":{"200":{"description":"Cancel domain","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this domain belongs to."},"name":{"type":"string","description":"Apex domain name."},"status":{"type":"string","enum":["pending","active","failed","cancelled","expired"],"description":"Current lifecycle status of this domain."},"registrar":{"type":"string","enum":["mailpool"],"description":"Registrar this domain was purchased through."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Registrar metadata stored on this domain."},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"],"description":"DNS record type."},"name":{"type":"string","description":"DNS record hostname."},"value":{"type":"string","description":"DNS record value."},"ttl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Time-to-live for this record in seconds, if set."},"priority":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"MX or SRV priority, if this record type uses one."}},"required":["type","name","value","ttl","priority"],"additionalProperties":false},"description":"DNS records that must be configured for this domain."},"priceCredits":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Credit cost of this domain, if priced."},"billingUsageUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Billing usage record for the purchase or last renewal, if any."},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain registration expires, if known."},"renewalChargedUntil":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End of the last period credits were charged for, if any."},"autoRenew":{"type":"boolean","description":"Whether this domain should renew automatically when it expires."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who purchased this domain."},"createdAt":{"description":"Time this domain was created.","type":"string"},"updatedAt":{"description":"Time this domain was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","status","registrar","meta","dnsRecords","priceCredits","billingUsageUuid","expiresAt","renewalChargedUntil","autoRenew","userUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Domain","description":"Cancelled domain. Cancellation does not refund the credits charged at purchase time."}},"required":["domain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/domainManagement/domains/{uuid}/dns-records":{"get":{"operationId":"getDomainManagementDomainsByUuidDnsRecords","summary":"List DNS records","description":"List a managed domain's DNS records (GET /domainManagement/domains/{uuid}/dns-records).","tags":["Domain Management - Domains"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Domain identifier."},"required":true,"description":"Domain identifier."}],"responses":{"200":{"description":"List DNS records","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"],"description":"DNS record type."},"name":{"type":"string","description":"DNS record hostname."},"value":{"type":"string","description":"DNS record value."},"ttl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Time-to-live for this record in seconds, if set."},"priority":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"MX or SRV priority, if this record type uses one."}},"required":["type","name","value","ttl","priority"],"additionalProperties":false},"title":"DNS records","description":"Latest known DNS records snapshot. Refreshed on status refresh and DNS mutations."}},"required":["dnsRecords"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putDomainManagementDomainsByUuidDnsRecords","summary":"Set DNS records","description":"Replace a managed domain's DNS records (PUT /domainManagement/domains/{uuid}/dns-records).","tags":["Domain Management - Domains"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Domain identifier."},"required":true,"description":"Domain identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"],"description":"DNS record type."},"name":{"type":"string","description":"DNS record hostname."},"value":{"type":"string","description":"DNS record value."},"ttl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Time-to-live for this record in seconds, if set."},"priority":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"MX or SRV priority, if this record type uses one."}},"required":["type","name","value","ttl","priority"]},"title":"Records","description":"Full desired DNS record set for the domain's zone."}},"required":["records"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Set DNS records","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this domain belongs to."},"name":{"type":"string","description":"Apex domain name."},"status":{"type":"string","enum":["pending","active","failed","cancelled","expired"],"description":"Current lifecycle status of this domain."},"registrar":{"type":"string","enum":["mailpool"],"description":"Registrar this domain was purchased through."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Registrar metadata stored on this domain."},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"],"description":"DNS record type."},"name":{"type":"string","description":"DNS record hostname."},"value":{"type":"string","description":"DNS record value."},"ttl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Time-to-live for this record in seconds, if set."},"priority":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"MX or SRV priority, if this record type uses one."}},"required":["type","name","value","ttl","priority"],"additionalProperties":false},"description":"DNS records that must be configured for this domain."},"priceCredits":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Credit cost of this domain, if priced."},"billingUsageUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Billing usage record for the purchase or last renewal, if any."},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain registration expires, if known."},"renewalChargedUntil":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End of the last period credits were charged for, if any."},"autoRenew":{"type":"boolean","description":"Whether this domain should renew automatically when it expires."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who purchased this domain."},"createdAt":{"description":"Time this domain was created.","type":"string"},"updatedAt":{"description":"Time this domain was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","status","registrar","meta","dnsRecords","priceCredits","billingUsageUuid","expiresAt","renewalChargedUntil","autoRenew","userUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Domain","description":"Domain after the DNS update."}},"required":["domain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/domainManagement/domains/{uuid}/refresh-status":{"post":{"operationId":"postDomainManagementDomainsByUuidRefreshStatus","summary":"Refresh domain status","description":"Re-poll the registrar for a managed domain's status (POST /domainManagement/domains/{uuid}/refresh-status).","tags":["Domain Management - Domains"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Domain identifier."},"required":true,"description":"Domain identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Refresh domain status","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this domain belongs to."},"name":{"type":"string","description":"Apex domain name."},"status":{"type":"string","enum":["pending","active","failed","cancelled","expired"],"description":"Current lifecycle status of this domain."},"registrar":{"type":"string","enum":["mailpool"],"description":"Registrar this domain was purchased through."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Registrar metadata stored on this domain."},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"],"description":"DNS record type."},"name":{"type":"string","description":"DNS record hostname."},"value":{"type":"string","description":"DNS record value."},"ttl":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Time-to-live for this record in seconds, if set."},"priority":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"MX or SRV priority, if this record type uses one."}},"required":["type","name","value","ttl","priority"],"additionalProperties":false},"description":"DNS records that must be configured for this domain."},"priceCredits":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Credit cost of this domain, if priced."},"billingUsageUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Billing usage record for the purchase or last renewal, if any."},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain registration expires, if known."},"renewalChargedUntil":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End of the last period credits were charged for, if any."},"autoRenew":{"type":"boolean","description":"Whether this domain should renew automatically when it expires."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who purchased this domain."},"createdAt":{"description":"Time this domain was created.","type":"string"},"updatedAt":{"description":"Time this domain was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this domain was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","status","registrar","meta","dnsRecords","priceCredits","billingUsageUuid","expiresAt","renewalChargedUntil","autoRenew","userUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Domain","description":"Domain after the registrar status refresh."}},"required":["domain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/expression/expressions/evaluate":{"post":{"operationId":"postExpressionExpressionsEvaluate","summary":"Evaluate expression","description":"Evaluate a formula expression (POST /expression/expressions/evaluate).","tags":["Expression - Expressions"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variables":{"title":"Variables","description":"Variables used to evaluate the expression."},"expression":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"expression":{"type":"string","description":"Expression source to evaluate."}},"required":["kind","instructTo","expression"]},{"anyOf":[{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is not based on a recipe.","enum":[false]}},"required":["fromRecipe"]},{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is based on a recipe.","enum":[true]},"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"version":{"type":"number","description":"Recipe version this expression uses."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values bound to each recipe placeholder."}},"required":["uuid","version","variables"],"description":"Recipe this expression was created from."}},"required":["fromRecipe","recipe"]}]}],"title":"Expression","description":"Expression to evaluate."}},"required":["variables","expression"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Evaluate expression","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"title":"Data","description":"Evaluation result."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/expression/expressions/generate":{"post":{"operationId":"postExpressionExpressionsGenerate","summary":"Generate expression","description":"Generate an expression using AI (POST /expression/expressions/generate).","tags":["Expression - Expressions"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","title":"Prompt","description":"Prompt to generate an expression."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Variables","description":"Variables available for generation."}},"required":["prompt","variables"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Generate expression","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"title":"Data","description":"Generated expression result."}},"required":["data"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/expression/recipes":{"post":{"operationId":"postExpressionRecipes","summary":"Create recipe","description":"Create a new expression recipe (POST /expression/recipes).","tags":["Expression - Recipes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Recipe name."},"description":{"type":"string","minLength":1,"maxLength":1000,"title":"Description","description":"Recipe description."},"category":{"type":"string","enum":["other","classification","cleaning","marketing","sales","event","copywriting"],"title":"Category","description":"Recipe category."},"isPublic":{"type":"boolean","title":"Is public","description":"Whether the recipe is public."},"placeholders":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"]},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"]},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"]}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"]}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"]}]}]},"title":"Placeholders","description":"Recipe placeholders."},"expression":{"type":"string","title":"Expression","description":"Recipe expression."},"kind":{"type":"string","enum":["jsExpression","templateExpression"],"title":"Kind","description":"Expression kind."},"instructTo":{"type":"string","enum":["ai","none"],"title":"Instruct to","description":"Instruction target."}},"required":["name","description","category","isPublic","placeholders","expression","kind","instructTo"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create recipe","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{},"additionalProperties":false},{"type":"object","properties":{"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"shortId":{"type":"string","description":"Short public identifier for this recipe."},"version":{"type":"number","description":"Recipe version number."},"workspaceUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workspace this recipe belongs to, or null if it is a platform recipe."},"name":{"type":"string","description":"Recipe display name."},"description":{"type":"string","description":"What this recipe does."},"category":{"type":"string","enum":["other","classification","cleaning","marketing","sales","event","copywriting"],"description":"Category this recipe is filed under."},"isPublic":{"type":"boolean","description":"Whether this recipe is visible outside its workspace."},"isBlacklisted":{"type":"boolean","description":"Whether this recipe is hidden from the catalog."},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this recipe version was archived, if it has been."},"placeholders":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"],"additionalProperties":false}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"],"additionalProperties":false}]}]},"description":"Variables callers must bind when using this recipe."},"expression":{"type":"string","description":"Recipe expression source, with placeholders instead of workspace-specific values."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"userUuid":{"type":"string","description":"User who created this recipe."},"userFirstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Author first name, if set."},"userLastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Author last name, if set."},"userPicture":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the author's profile picture."}},"required":["uuid","shortId","version","workspaceUuid","name","description","category","isPublic","isBlacklisted","archivedAt","placeholders","expression","instructTo","kind","userUuid","userFirstName","userLastName","userPicture"],"additionalProperties":false,"title":"Recipe","description":"Created recipe details."}},"required":["recipe"],"additionalProperties":false}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/expression/recipes/list":{"get":{"operationId":"getExpressionRecipesList","summary":"List recipes","description":"List all expression recipes (GET /expression/recipes/list).","tags":["Expression - Recipes"],"parameters":[{"in":"query","name":"uiTypes","schema":{"title":"UI types","description":"UI types to include.","type":"array","items":{"type":"string","enum":["ai","js"]}},"description":"UI types to include."},{"in":"query","name":"tab","schema":{"title":"Tab","description":"Recipe tab filter.","type":"string","enum":["all","user","workspace","favorites"]},"description":"Recipe tab filter."},{"in":"query","name":"categories","schema":{"title":"Categories","description":"Recipe categories to include.","type":"array","items":{"type":"string","enum":["other","classification","cleaning","marketing","sales","event","copywriting"]}},"description":"Recipe categories to include."},{"in":"query","name":"name","schema":{"title":"Name","description":"Filter recipes by name.","type":"string"},"description":"Filter recipes by name."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of recipes to return.","type":"string"},"description":"Maximum number of recipes to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of recipes to skip.","type":"string"},"description":"Number of recipes to skip."}],"responses":{"200":{"description":"List recipes","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"recipes":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"shortId":{"type":"string","description":"Short public identifier for this recipe."},"version":{"type":"number","description":"Recipe version number."},"workspaceUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workspace this recipe belongs to, or null if it is a platform recipe."},"name":{"type":"string","description":"Recipe display name."},"description":{"type":"string","description":"What this recipe does."},"category":{"type":"string","enum":["other","classification","cleaning","marketing","sales","event","copywriting"],"description":"Category this recipe is filed under."},"isPublic":{"type":"boolean","description":"Whether this recipe is visible outside its workspace."},"isBlacklisted":{"type":"boolean","description":"Whether this recipe is hidden from the catalog."},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this recipe version was archived, if it has been."},"placeholders":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"],"additionalProperties":false}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"],"additionalProperties":false}]}]},"description":"Variables callers must bind when using this recipe."},"expression":{"type":"string","description":"Recipe expression source, with placeholders instead of workspace-specific values."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"userUuid":{"type":"string","description":"User who created this recipe."},"userFirstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Author first name, if set."},"userLastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Author last name, if set."},"userPicture":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the author's profile picture."},"isFavorite":{"type":"boolean","description":"Whether the current user has favorited this recipe."}},"required":["uuid","shortId","version","workspaceUuid","name","description","category","isPublic","isBlacklisted","archivedAt","placeholders","expression","instructTo","kind","userUuid","userFirstName","userLastName","userPicture","isFavorite"],"additionalProperties":false},"title":"Recipes","description":"List of recipes."}},"required":["recipes"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/expression/recipes/{uuidOrShortId}/{version}":{"get":{"operationId":"getExpressionRecipesByUuidOrShortIdByVersion","summary":"Get recipe","description":"Get a recipe by UUID or short ID and version (GET /expression/recipes/{uuidOrShortId}/{version}).","tags":["Expression - Recipes"],"parameters":[{"in":"path","name":"uuidOrShortId","schema":{"type":"string","title":"UUID or short ID","description":"Recipe identifier (UUID or short id)."},"required":true,"description":"Recipe identifier (UUID or short id)."},{"in":"path","name":"version","schema":{"type":"string","title":"Version","description":"Recipe version."},"required":true,"description":"Recipe version."}],"responses":{"200":{"description":"Get recipe","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"shortId":{"type":"string","description":"Short public identifier for this recipe."},"version":{"type":"number","description":"Recipe version number."},"workspaceUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workspace this recipe belongs to, or null if it is a platform recipe."},"name":{"type":"string","description":"Recipe display name."},"description":{"type":"string","description":"What this recipe does."},"category":{"type":"string","enum":["other","classification","cleaning","marketing","sales","event","copywriting"],"description":"Category this recipe is filed under."},"isPublic":{"type":"boolean","description":"Whether this recipe is visible outside its workspace."},"isBlacklisted":{"type":"boolean","description":"Whether this recipe is hidden from the catalog."},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this recipe version was archived, if it has been."},"placeholders":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"],"additionalProperties":false}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"],"additionalProperties":false}]}]},"description":"Variables callers must bind when using this recipe."},"expression":{"type":"string","description":"Recipe expression source, with placeholders instead of workspace-specific values."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"userUuid":{"type":"string","description":"User who created this recipe."},"userFirstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Author first name, if set."},"userLastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Author last name, if set."},"userPicture":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the author's profile picture."},"isFavorite":{"type":"boolean","description":"Whether the current user has favorited this recipe."}},"required":["uuid","shortId","version","workspaceUuid","name","description","category","isPublic","isBlacklisted","archivedAt","placeholders","expression","instructTo","kind","userUuid","userFirstName","userLastName","userPicture","isFavorite"],"additionalProperties":false,"title":"Recipe","description":"Recipe details."}},"required":["recipe"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/expression/recipes/{uuidOrShortId}/last":{"get":{"operationId":"getExpressionRecipesByUuidOrShortIdLast","summary":"Get last version","description":"Get the last version of a recipe (GET /expression/recipes/{uuidOrShortId}/last).","tags":["Expression - Recipes"],"parameters":[{"in":"path","name":"uuidOrShortId","schema":{"type":"string","title":"UUID or short ID","description":"Recipe identifier (UUID or short id)."},"required":true,"description":"Recipe identifier (UUID or short id)."}],"responses":{"200":{"description":"Get last version","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"shortId":{"type":"string","description":"Short public identifier for this recipe."},"version":{"type":"number","description":"Recipe version number."},"workspaceUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workspace this recipe belongs to, or null if it is a platform recipe."},"name":{"type":"string","description":"Recipe display name."},"description":{"type":"string","description":"What this recipe does."},"category":{"type":"string","enum":["other","classification","cleaning","marketing","sales","event","copywriting"],"description":"Category this recipe is filed under."},"isPublic":{"type":"boolean","description":"Whether this recipe is visible outside its workspace."},"isBlacklisted":{"type":"boolean","description":"Whether this recipe is hidden from the catalog."},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this recipe version was archived, if it has been."},"placeholders":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"],"additionalProperties":false}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"],"additionalProperties":false}]}]},"description":"Variables callers must bind when using this recipe."},"expression":{"type":"string","description":"Recipe expression source, with placeholders instead of workspace-specific values."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"userUuid":{"type":"string","description":"User who created this recipe."},"userFirstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Author first name, if set."},"userLastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Author last name, if set."},"userPicture":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the author's profile picture."},"isFavorite":{"type":"boolean","description":"Whether the current user has favorited this recipe."}},"required":["uuid","shortId","version","workspaceUuid","name","description","category","isPublic","isBlacklisted","archivedAt","placeholders","expression","instructTo","kind","userUuid","userFirstName","userLastName","userPicture","isFavorite"],"additionalProperties":false,"title":"Recipe","description":"Recipe details."}},"required":["recipe"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/expression/recipes/{uuid}":{"post":{"operationId":"postExpressionRecipesByUuid","summary":"Create new version","description":"Create a new version of a recipe (POST /expression/recipes/{uuid}).","tags":["Expression - Recipes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Recipe identifier."},"required":true,"description":"Recipe identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Recipe name."},"description":{"type":"string","minLength":1,"maxLength":1000,"title":"Description","description":"Recipe description."},"category":{"type":"string","enum":["other","classification","cleaning","marketing","sales","event","copywriting"],"title":"Category","description":"Recipe category."},"isPublic":{"type":"boolean","title":"Is public","description":"Whether the recipe is public."},"placeholders":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"]},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"]},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"]}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"]}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"]}]}]},"title":"Placeholders","description":"Recipe placeholders."},"expression":{"type":"string","title":"Expression","description":"Recipe expression."}},"required":["name","description","category","isPublic","placeholders","expression"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create new version","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{},"additionalProperties":false},{"type":"object","properties":{"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"shortId":{"type":"string","description":"Short public identifier for this recipe."},"version":{"type":"number","description":"Recipe version number."},"workspaceUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workspace this recipe belongs to, or null if it is a platform recipe."},"name":{"type":"string","description":"Recipe display name."},"description":{"type":"string","description":"What this recipe does."},"category":{"type":"string","enum":["other","classification","cleaning","marketing","sales","event","copywriting"],"description":"Category this recipe is filed under."},"isPublic":{"type":"boolean","description":"Whether this recipe is visible outside its workspace."},"isBlacklisted":{"type":"boolean","description":"Whether this recipe is hidden from the catalog."},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this recipe version was archived, if it has been."},"placeholders":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Placeholder is a list of nested placeholders."},"items":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Placeholder identifier used in the recipe expression."},"name":{"type":"string","description":"Placeholder display name."},"description":{"description":"What this placeholder is for, if set.","type":"string"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean"],"description":"Placeholder value type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Placeholder accepts one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values when this placeholder is an enum."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"],"additionalProperties":false}]}]},"description":"Nested placeholders when this placeholder is an array."}},"required":["kind","items"],"additionalProperties":false}]}]},"description":"Variables callers must bind when using this recipe."},"expression":{"type":"string","description":"Recipe expression source, with placeholders instead of workspace-specific values."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"userUuid":{"type":"string","description":"User who created this recipe."},"userFirstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Author first name, if set."},"userLastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Author last name, if set."},"userPicture":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the author's profile picture."}},"required":["uuid","shortId","version","workspaceUuid","name","description","category","isPublic","isBlacklisted","archivedAt","placeholders","expression","instructTo","kind","userUuid","userFirstName","userLastName","userPicture"],"additionalProperties":false,"title":"Recipe","description":"Created recipe version details."}},"required":["recipe"],"additionalProperties":false}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/expression/recipes/{uuid}/archive":{"put":{"operationId":"putExpressionRecipesByUuidArchive","summary":"Archive recipe","description":"Archive an expression recipe (PUT /expression/recipes/{uuid}/archive).","tags":["Expression - Recipes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Recipe identifier."},"required":true,"description":"Recipe identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Archive recipe","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/expression/favoriteRecipes":{"post":{"operationId":"postExpressionFavoriteRecipes","summary":"Create favorite recipe","description":"Add a recipe to favorites (POST /expression/favoriteRecipes).","tags":["Expression - Favorite Recipes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipeUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Recipe UUID","description":"Recipe identifier to favorite."}},"required":["recipeUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create favorite recipe","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"favoriteRecipe":{"type":"object","properties":{"userUuid":{"type":"string","description":"User who favorited the recipe."},"workspaceUuid":{"type":"string","description":"Workspace this favorite belongs to."},"recipeUuid":{"type":"string","description":"Recipe that was favorited."},"createdAt":{"description":"Time this favorite was created.","type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this favorite was removed, if it has been."}},"required":["userUuid","workspaceUuid","recipeUuid","createdAt","archivedAt"],"additionalProperties":false,"title":"Favorite recipe","description":"Favorite recipe details."}},"required":["favoriteRecipe"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/expression/favoriteRecipes/{recipeUuid}":{"delete":{"operationId":"deleteExpressionFavoriteRecipesByRecipeUuid","summary":"Remove favorite recipe","description":"Remove a recipe from favorites (DELETE /expression/favoriteRecipes/{recipeUuid}).","tags":["Expression - Favorite Recipes"],"parameters":[{"in":"path","name":"recipeUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Recipe UUID","description":"Recipe identifier."},"required":true,"description":"Recipe identifier."}],"responses":{"200":{"description":"Remove favorite recipe","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/apps":{"post":{"operationId":"postHostingApps","summary":"Create app","description":"Create a new hosted app (POST /hosting/apps).","tags":["Hosting - Apps"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"App name."},"slug":{"type":"string","pattern":"^[a-z][a-z0-9-]{2,30}$","title":"Slug","description":"App URL slug."},"folderUuid":{"title":"Folder UUID","description":"Folder identifier for the app.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":{"title":"Description","description":"App description.","type":"string","minLength":1,"maxLength":1000}},"required":["name","slug"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create app","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this app belongs to."},"name":{"type":"string","description":"App display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"App description, if set."},"slug":{"type":"string","description":"URL slug used to serve this app."},"url":{"type":"string","description":"Public URL of the promoted app."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this app."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this app is filed under, if any."},"promotedDeployment":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this deployment belongs to."},"meta":{"type":"object","properties":{},"additionalProperties":false,"description":"App-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","appUuid","meta"],"additionalProperties":false},{"type":"null"}],"description":"Currently live deployment, if one has been promoted."},"chargedUntil":{"description":"Time through which this app is billed.","type":"string"},"createdAt":{"description":"Time this app was created.","type":"string"},"updatedAt":{"description":"Time this app was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this app was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","description","slug","url","userUuid","folderUuid","promotedDeployment","chargedUntil","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"App","description":"Created app details."}},"required":["app"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/apps/list":{"post":{"operationId":"postHostingAppsList","summary":"List apps","description":"List hosted apps in the workspace (POST /hosting/apps/list).","tags":["Hosting - Apps"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderUuid":{"title":"Folder UUID","description":"Filter by folder. Use 'null' to list apps that are not in any folder.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List apps","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"apps":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this app belongs to."},"name":{"type":"string","description":"App display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"App description, if set."},"slug":{"type":"string","description":"URL slug used to serve this app."},"url":{"type":"string","description":"Public URL of the promoted app."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this app."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this app is filed under, if any."},"promotedDeployment":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this deployment belongs to."},"meta":{"type":"object","properties":{},"additionalProperties":false,"description":"App-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","appUuid","meta"],"additionalProperties":false},{"type":"null"}],"description":"Currently live deployment, if one has been promoted."},"chargedUntil":{"description":"Time through which this app is billed.","type":"string"},"createdAt":{"description":"Time this app was created.","type":"string"},"updatedAt":{"description":"Time this app was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this app was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","description","slug","url","userUuid","folderUuid","promotedDeployment","chargedUntil","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"Apps","description":"List of apps."}},"required":["apps"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/apps/{uuid}":{"get":{"operationId":"getHostingAppsByUuid","summary":"Get app","description":"Get a hosted app by UUID (GET /hosting/apps/{uuid}).","tags":["Hosting - Apps"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"App identifier."},"required":true,"description":"App identifier."}],"responses":{"200":{"description":"Get app","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this app belongs to."},"name":{"type":"string","description":"App display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"App description, if set."},"slug":{"type":"string","description":"URL slug used to serve this app."},"url":{"type":"string","description":"Public URL of the promoted app."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this app."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this app is filed under, if any."},"promotedDeployment":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this deployment belongs to."},"meta":{"type":"object","properties":{},"additionalProperties":false,"description":"App-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","appUuid","meta"],"additionalProperties":false},{"type":"null"}],"description":"Currently live deployment, if one has been promoted."},"chargedUntil":{"description":"Time through which this app is billed.","type":"string"},"createdAt":{"description":"Time this app was created.","type":"string"},"updatedAt":{"description":"Time this app was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this app was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","description","slug","url","userUuid","folderUuid","promotedDeployment","chargedUntil","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"App","description":"App details."}},"required":["app"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putHostingAppsByUuid","summary":"Update app","description":"Update a hosted app (PUT /hosting/apps/{uuid}).","tags":["Hosting - Apps"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"App identifier."},"required":true,"description":"App identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"App name.","type":"string","minLength":1,"maxLength":255},"folderUuid":{"title":"Folder UUID","description":"Folder identifier for the app.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"description":{"title":"Description","description":"App description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update app","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this app belongs to."},"name":{"type":"string","description":"App display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"App description, if set."},"slug":{"type":"string","description":"URL slug used to serve this app."},"url":{"type":"string","description":"Public URL of the promoted app."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this app."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this app is filed under, if any."},"promotedDeployment":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this deployment belongs to."},"meta":{"type":"object","properties":{},"additionalProperties":false,"description":"App-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","appUuid","meta"],"additionalProperties":false},{"type":"null"}],"description":"Currently live deployment, if one has been promoted."},"chargedUntil":{"description":"Time through which this app is billed.","type":"string"},"createdAt":{"description":"Time this app was created.","type":"string"},"updatedAt":{"description":"Time this app was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this app was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","description","slug","url","userUuid","folderUuid","promotedDeployment","chargedUntil","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"App","description":"Updated app details."}},"required":["app"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteHostingAppsByUuid","summary":"Remove app","description":"Remove a hosted app (DELETE /hosting/apps/{uuid}).","tags":["Hosting - Apps"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"App identifier."},"required":true,"description":"App identifier."}],"responses":{"200":{"description":"Remove app","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/workers":{"post":{"operationId":"postHostingWorkers","summary":"Create worker","description":"Create a new hosted worker (POST /hosting/workers).","tags":["Hosting - Workers"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Worker name."},"slug":{"type":"string","pattern":"^[a-z][a-z0-9-]{2,30}$","title":"Slug","description":"Worker URL slug."},"folderUuid":{"title":"Folder UUID","description":"Folder identifier for the worker.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":{"title":"Description","description":"Worker description.","type":"string","minLength":1,"maxLength":1000},"triggers":{"title":"Triggers","description":"Cron triggers for the worker. Each trigger calls the worker's URL at the given path on the schedule.","maxItems":10,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"This trigger fires on a cron schedule.","enum":["cron"]},"name":{"type":"string","minLength":1,"description":"Display name of this scheduled trigger."},"description":{"description":"Human-readable description of this trigger, if set.","type":"string"},"cron":{"type":"string","description":"Schedule as a cron expression or '@every <duration>'."},"path":{"type":"string","maxLength":2048,"description":"HTTP path the scheduled request hits. Must start with '/'."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used for the scheduled request."},"data":{"description":"Optional JSON body sent with the scheduled request.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"headers":{"description":"Optional HTTP headers sent with the scheduled request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}}},"required":["type","name","cron","path","method"]}}},"required":["name","slug"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create worker","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"worker":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this worker belongs to."},"name":{"type":"string","description":"Worker display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Worker description, if set."},"slug":{"type":"string","description":"URL slug used to serve this worker."},"url":{"type":"string","description":"Public URL of the promoted worker."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this worker."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this worker is filed under, if any."},"promotedDeployment":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this deployment belongs to."},"meta":{"type":"object","properties":{"bundleSha256":{"type":"string","description":"SHA-256 digest of the built worker bundle."},"outboundAllowlist":{"type":"array","items":{"type":"string"},"description":"Hostnames the worker is allowed to call outbound."},"kind":{"description":"Optional worker kind, currently only custom-integration.","type":"string","enum":["custom-integration"]}},"required":["bundleSha256","outboundAllowlist"],"additionalProperties":false,"description":"Worker-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","workerUuid","meta"],"additionalProperties":false},{"type":"null"}],"description":"Currently live deployment, if one has been promoted."},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"This trigger fires on a cron schedule.","enum":["cron"]},"name":{"type":"string","minLength":1,"description":"Display name of this scheduled trigger."},"description":{"description":"Human-readable description of this trigger, if set.","type":"string"},"cron":{"type":"string","description":"Schedule as a cron expression or '@every <duration>'."},"path":{"type":"string","maxLength":2048,"description":"HTTP path the scheduled request hits. Must start with '/'."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used for the scheduled request."},"data":{"description":"Optional JSON body sent with the scheduled request.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"headers":{"description":"Optional HTTP headers sent with the scheduled request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal workflow identifier that owns this schedule."}},"required":["type","name","cron","path","method","temporalScheduleWorkflowId"],"additionalProperties":false},"description":"Scheduled HTTP triggers that invoke this worker."},"chargedUntil":{"description":"Time through which this worker is billed.","type":"string"},"createdAt":{"description":"Time this worker was created.","type":"string"},"updatedAt":{"description":"Time this worker was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this worker was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","description","slug","url","userUuid","folderUuid","promotedDeployment","triggers","chargedUntil","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Worker","description":"Created worker details."}},"required":["worker"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/workers/list":{"post":{"operationId":"postHostingWorkersList","summary":"List workers","description":"List hosted workers in the workspace (POST /hosting/workers/list).","tags":["Hosting - Workers"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderUuid":{"title":"Folder UUID","description":"Filter by folder. Use 'null' to list workers that are not in any folder.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List workers","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workers":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this worker belongs to."},"name":{"type":"string","description":"Worker display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Worker description, if set."},"slug":{"type":"string","description":"URL slug used to serve this worker."},"url":{"type":"string","description":"Public URL of the promoted worker."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this worker."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this worker is filed under, if any."},"promotedDeployment":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this deployment belongs to."},"meta":{"type":"object","properties":{"bundleSha256":{"type":"string","description":"SHA-256 digest of the built worker bundle."},"outboundAllowlist":{"type":"array","items":{"type":"string"},"description":"Hostnames the worker is allowed to call outbound."},"kind":{"description":"Optional worker kind, currently only custom-integration.","type":"string","enum":["custom-integration"]}},"required":["bundleSha256","outboundAllowlist"],"additionalProperties":false,"description":"Worker-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","workerUuid","meta"],"additionalProperties":false},{"type":"null"}],"description":"Currently live deployment, if one has been promoted."},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"This trigger fires on a cron schedule.","enum":["cron"]},"name":{"type":"string","minLength":1,"description":"Display name of this scheduled trigger."},"description":{"description":"Human-readable description of this trigger, if set.","type":"string"},"cron":{"type":"string","description":"Schedule as a cron expression or '@every <duration>'."},"path":{"type":"string","maxLength":2048,"description":"HTTP path the scheduled request hits. Must start with '/'."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used for the scheduled request."},"data":{"description":"Optional JSON body sent with the scheduled request.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"headers":{"description":"Optional HTTP headers sent with the scheduled request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal workflow identifier that owns this schedule."}},"required":["type","name","cron","path","method","temporalScheduleWorkflowId"],"additionalProperties":false},"description":"Scheduled HTTP triggers that invoke this worker."},"chargedUntil":{"description":"Time through which this worker is billed.","type":"string"},"createdAt":{"description":"Time this worker was created.","type":"string"},"updatedAt":{"description":"Time this worker was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this worker was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","description","slug","url","userUuid","folderUuid","promotedDeployment","triggers","chargedUntil","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"Workers","description":"List of workers."}},"required":["workers"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/workers/{uuid}":{"get":{"operationId":"getHostingWorkersByUuid","summary":"Get worker","description":"Get a hosted worker by UUID (GET /hosting/workers/{uuid}).","tags":["Hosting - Workers"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Worker identifier."},"required":true,"description":"Worker identifier."}],"responses":{"200":{"description":"Get worker","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"worker":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this worker belongs to."},"name":{"type":"string","description":"Worker display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Worker description, if set."},"slug":{"type":"string","description":"URL slug used to serve this worker."},"url":{"type":"string","description":"Public URL of the promoted worker."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this worker."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this worker is filed under, if any."},"promotedDeployment":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this deployment belongs to."},"meta":{"type":"object","properties":{"bundleSha256":{"type":"string","description":"SHA-256 digest of the built worker bundle."},"outboundAllowlist":{"type":"array","items":{"type":"string"},"description":"Hostnames the worker is allowed to call outbound."},"kind":{"description":"Optional worker kind, currently only custom-integration.","type":"string","enum":["custom-integration"]}},"required":["bundleSha256","outboundAllowlist"],"additionalProperties":false,"description":"Worker-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","workerUuid","meta"],"additionalProperties":false},{"type":"null"}],"description":"Currently live deployment, if one has been promoted."},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"This trigger fires on a cron schedule.","enum":["cron"]},"name":{"type":"string","minLength":1,"description":"Display name of this scheduled trigger."},"description":{"description":"Human-readable description of this trigger, if set.","type":"string"},"cron":{"type":"string","description":"Schedule as a cron expression or '@every <duration>'."},"path":{"type":"string","maxLength":2048,"description":"HTTP path the scheduled request hits. Must start with '/'."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used for the scheduled request."},"data":{"description":"Optional JSON body sent with the scheduled request.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"headers":{"description":"Optional HTTP headers sent with the scheduled request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal workflow identifier that owns this schedule."}},"required":["type","name","cron","path","method","temporalScheduleWorkflowId"],"additionalProperties":false},"description":"Scheduled HTTP triggers that invoke this worker."},"chargedUntil":{"description":"Time through which this worker is billed.","type":"string"},"createdAt":{"description":"Time this worker was created.","type":"string"},"updatedAt":{"description":"Time this worker was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this worker was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","description","slug","url","userUuid","folderUuid","promotedDeployment","triggers","chargedUntil","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Worker","description":"Worker details."}},"required":["worker"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putHostingWorkersByUuid","summary":"Update worker","description":"Update a hosted worker (PUT /hosting/workers/{uuid}).","tags":["Hosting - Workers"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Worker identifier."},"required":true,"description":"Worker identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Worker name.","type":"string","minLength":1,"maxLength":255},"folderUuid":{"title":"Folder UUID","description":"Folder identifier for the worker.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"description":{"title":"Description","description":"Worker description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"triggers":{"title":"Triggers","description":"Full replacement list of the worker's triggers. Each cron trigger POSTs the worker's URL at the given path on the schedule.","maxItems":10,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"This trigger fires on a cron schedule.","enum":["cron"]},"name":{"type":"string","minLength":1,"description":"Display name of this scheduled trigger."},"description":{"description":"Human-readable description of this trigger, if set.","type":"string"},"cron":{"type":"string","description":"Schedule as a cron expression or '@every <duration>'."},"path":{"type":"string","maxLength":2048,"description":"HTTP path the scheduled request hits. Must start with '/'."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used for the scheduled request."},"data":{"description":"Optional JSON body sent with the scheduled request.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"headers":{"description":"Optional HTTP headers sent with the scheduled request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}}},"required":["type","name","cron","path","method"]}}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update worker","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"worker":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this worker belongs to."},"name":{"type":"string","description":"Worker display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Worker description, if set."},"slug":{"type":"string","description":"URL slug used to serve this worker."},"url":{"type":"string","description":"Public URL of the promoted worker."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this worker."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this worker is filed under, if any."},"promotedDeployment":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this deployment belongs to."},"meta":{"type":"object","properties":{"bundleSha256":{"type":"string","description":"SHA-256 digest of the built worker bundle."},"outboundAllowlist":{"type":"array","items":{"type":"string"},"description":"Hostnames the worker is allowed to call outbound."},"kind":{"description":"Optional worker kind, currently only custom-integration.","type":"string","enum":["custom-integration"]}},"required":["bundleSha256","outboundAllowlist"],"additionalProperties":false,"description":"Worker-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","workerUuid","meta"],"additionalProperties":false},{"type":"null"}],"description":"Currently live deployment, if one has been promoted."},"triggers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"This trigger fires on a cron schedule.","enum":["cron"]},"name":{"type":"string","minLength":1,"description":"Display name of this scheduled trigger."},"description":{"description":"Human-readable description of this trigger, if set.","type":"string"},"cron":{"type":"string","description":"Schedule as a cron expression or '@every <duration>'."},"path":{"type":"string","maxLength":2048,"description":"HTTP path the scheduled request hits. Must start with '/'."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used for the scheduled request."},"data":{"description":"Optional JSON body sent with the scheduled request.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"headers":{"description":"Optional HTTP headers sent with the scheduled request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal workflow identifier that owns this schedule."}},"required":["type","name","cron","path","method","temporalScheduleWorkflowId"],"additionalProperties":false},"description":"Scheduled HTTP triggers that invoke this worker."},"chargedUntil":{"description":"Time through which this worker is billed.","type":"string"},"createdAt":{"description":"Time this worker was created.","type":"string"},"updatedAt":{"description":"Time this worker was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this worker was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","description","slug","url","userUuid","folderUuid","promotedDeployment","triggers","chargedUntil","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Worker","description":"Updated worker details."}},"required":["worker"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteHostingWorkersByUuid","summary":"Remove worker","description":"Remove a hosted worker (DELETE /hosting/workers/{uuid}).","tags":["Hosting - Workers"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Worker identifier."},"required":true,"description":"Worker identifier."}],"responses":{"200":{"description":"Remove worker","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/deployments":{"post":{"operationId":"postHostingDeployments","summary":"Create deployment","description":"Create a new deployment for an app or worker (POST /hosting/deployments).","tags":["Hosting - Deployments"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Discriminator for an app-backed deployment.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"App UUID","description":"Identifier of the app to deploy."},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path of the source file inside the bundle."},"content":{"type":"string","description":"File contents as text."}},"required":["path","content"]},"title":"Source files","description":"Inline source files for the deployment."}},"required":["kind","appUuid","files"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Discriminator for a worker-backed deployment.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Worker UUID","description":"Identifier of the worker to deploy."},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path of the source file inside the bundle."},"content":{"type":"string","description":"File contents as text."}},"required":["path","content"]},"title":"Source files","description":"Inline source files for the deployment."}},"required":["kind","workerUuid","files"],"additionalProperties":false}],"title":"Request body","description":"Request body schema.","type":"object"}}}},"responses":{"200":{"description":"Create deployment","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deployment":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this deployment belongs to."},"meta":{"type":"object","properties":{},"additionalProperties":false,"description":"App-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","appUuid","meta"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this deployment belongs to."},"meta":{"type":"object","properties":{"bundleSha256":{"type":"string","description":"SHA-256 digest of the built worker bundle."},"outboundAllowlist":{"type":"array","items":{"type":"string"},"description":"Hostnames the worker is allowed to call outbound."},"kind":{"description":"Optional worker kind, currently only custom-integration.","type":"string","enum":["custom-integration"]}},"required":["bundleSha256","outboundAllowlist"],"additionalProperties":false,"description":"Worker-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","workerUuid","meta"],"additionalProperties":false}],"title":"Deployment","description":"Created deployment details.","type":"object"}},"required":["deployment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/deployments/list":{"post":{"operationId":"postHostingDeploymentsList","summary":"List deployments","description":"List deployments for an app or worker (POST /hosting/deployments/list).","tags":["Hosting - Deployments"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUuid":{"title":"App UUID","description":"Identifier of the app whose deployments to list.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"workerUuid":{"title":"Worker UUID","description":"Identifier of the worker whose deployments to list.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"userUuid":{"title":"User UUID","description":"Restrict to deployments created by this user.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Deployment statuses to include.","type":"array","items":{"type":"string","enum":["pending","building","success","error","cancelled"]}},"createdAfter":{"title":"Created after","description":"Include deployments created after this ISO timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include deployments created before this ISO timestamp.","type":"string"},"limit":{"default":20,"title":"Limit","description":"Maximum number of deployments to return.","type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"title":"Offset","description":"Number of deployments to skip.","type":"integer","minimum":0,"maximum":9007199254740991}},"title":"Body","description":"Body schema."}}}},"responses":{"200":{"description":"List deployments","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Count","description":"Total number of deployments matching the filters."},"deployments":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this deployment belongs to."},"meta":{"type":"object","properties":{},"additionalProperties":false,"description":"App-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","appUuid","meta"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this deployment belongs to."},"meta":{"type":"object","properties":{"bundleSha256":{"type":"string","description":"SHA-256 digest of the built worker bundle."},"outboundAllowlist":{"type":"array","items":{"type":"string"},"description":"Hostnames the worker is allowed to call outbound."},"kind":{"description":"Optional worker kind, currently only custom-integration.","type":"string","enum":["custom-integration"]}},"required":["bundleSha256","outboundAllowlist"],"additionalProperties":false,"description":"Worker-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","workerUuid","meta"],"additionalProperties":false}],"type":"object"},"title":"Deployments","description":"Page of deployments."}},"required":["count","deployments"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/deployments/count":{"post":{"operationId":"postHostingDeploymentsCount","summary":"Count deployments","description":"Count deployments for an app or worker (POST /hosting/deployments/count).","tags":["Hosting - Deployments"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUuid":{"title":"App UUID","description":"Identifier of the app whose deployments to count.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"workerUuid":{"title":"Worker UUID","description":"Identifier of the worker whose deployments to count.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"userUuid":{"title":"User UUID","description":"Restrict to deployments created by this user.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Deployment statuses to include.","type":"array","items":{"type":"string","enum":["pending","building","success","error","cancelled"]}},"createdAfter":{"title":"Created after","description":"Include deployments created after this ISO timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include deployments created before this ISO timestamp.","type":"string"}},"title":"Body","description":"Body schema."}}}},"responses":{"200":{"description":"Count deployments","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Count","description":"Number of deployments matching the filters."}},"required":["count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/deployments/promoted":{"get":{"operationId":"getHostingDeploymentsPromoted","summary":"Get promoted deployment","description":"Get the currently promoted deployment for an app or worker (GET /hosting/deployments/promoted).","tags":["Hosting - Deployments"],"parameters":[{"in":"query","name":"appUuid","schema":{"title":"App UUID","description":"Identifier of the app to look up the promoted deployment for.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Identifier of the app to look up the promoted deployment for."},{"in":"query","name":"workerUuid","schema":{"title":"Worker UUID","description":"Identifier of the worker to look up the promoted deployment for.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Identifier of the worker to look up the promoted deployment for."}],"responses":{"200":{"description":"Get promoted deployment","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deployment":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this deployment belongs to."},"meta":{"type":"object","properties":{},"additionalProperties":false,"description":"App-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","appUuid","meta"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this deployment belongs to."},"meta":{"type":"object","properties":{"bundleSha256":{"type":"string","description":"SHA-256 digest of the built worker bundle."},"outboundAllowlist":{"type":"array","items":{"type":"string"},"description":"Hostnames the worker is allowed to call outbound."},"kind":{"description":"Optional worker kind, currently only custom-integration.","type":"string","enum":["custom-integration"]}},"required":["bundleSha256","outboundAllowlist"],"additionalProperties":false,"description":"Worker-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","workerUuid","meta"],"additionalProperties":false}],"title":"Promoted deployment","description":"Currently promoted deployment for the subject.","type":"object"}},"required":["deployment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/deployments/promote":{"post":{"operationId":"postHostingDeploymentsPromote","summary":"Promote deployment","description":"Promote a deployment to serve live traffic (POST /hosting/deployments/promote).","tags":["Hosting - Deployments"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Deployment UUID","description":"Identifier of the deployment to promote."}},"required":["uuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Promote deployment","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deployment":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this deployment belongs to."},"meta":{"type":"object","properties":{},"additionalProperties":false,"description":"App-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","appUuid","meta"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this deployment belongs to."},"meta":{"type":"object","properties":{"bundleSha256":{"type":"string","description":"SHA-256 digest of the built worker bundle."},"outboundAllowlist":{"type":"array","items":{"type":"string"},"description":"Hostnames the worker is allowed to call outbound."},"kind":{"description":"Optional worker kind, currently only custom-integration.","type":"string","enum":["custom-integration"]}},"required":["bundleSha256","outboundAllowlist"],"additionalProperties":false,"description":"Worker-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","workerUuid","meta"],"additionalProperties":false}],"title":"Deployment","description":"Deployment after the promotion.","type":"object"}},"required":["deployment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/deployments/cancel":{"post":{"operationId":"postHostingDeploymentsCancel","summary":"Cancel deployment","description":"Cancel an in-progress deployment (POST /hosting/deployments/cancel).","tags":["Hosting - Deployments"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Deployment UUID","description":"Identifier of the deployment to cancel."}},"required":["uuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Cancel deployment","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deployment":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this deployment belongs to."},"meta":{"type":"object","properties":{},"additionalProperties":false,"description":"App-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","appUuid","meta"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this deployment belongs to."},"meta":{"type":"object","properties":{"bundleSha256":{"type":"string","description":"SHA-256 digest of the built worker bundle."},"outboundAllowlist":{"type":"array","items":{"type":"string"},"description":"Hostnames the worker is allowed to call outbound."},"kind":{"description":"Optional worker kind, currently only custom-integration.","type":"string","enum":["custom-integration"]}},"required":["bundleSha256","outboundAllowlist"],"additionalProperties":false,"description":"Worker-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","workerUuid","meta"],"additionalProperties":false}],"title":"Deployment","description":"Deployment row at the time the cancel signal was sent. The status will flip to `cancelled` once the workflow's nonCancellable scope finishes writing the terminal row; clients should refetch shortly after.","type":"object"}},"required":["deployment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/deployments/{uuid}":{"get":{"operationId":"getHostingDeploymentsByUuid","summary":"Get deployment","description":"Get a deployment by UUID (GET /hosting/deployments/{uuid}).","tags":["Hosting - Deployments"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Deployment identifier."},"required":true,"description":"Deployment identifier."}],"responses":{"200":{"description":"Get deployment","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deployment":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this deployment belongs to."},"meta":{"type":"object","properties":{},"additionalProperties":false,"description":"App-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","appUuid","meta"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Deployment identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this deployment belongs to."},"sourceS3Path":{"type":"string","description":"S3 path of the uploaded source archive."},"bundleS3Path":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 path of the built bundle, if the build succeeded."},"status":{"type":"string","enum":["pending","building","success","error","cancelled"],"description":"Current build status of this deployment."},"buildLogS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Object key of the build log in S3, if one was written."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Build or deploy error message, if the deployment failed."},"url":{"type":"string","description":"Public URL of this deployment."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this deployment."},"promotedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this deployment was promoted to live, if it has been."},"promotedByUserUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"User who promoted this deployment, if it has been."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the build finished, if it has."},"temporalWorkflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Temporal workflow identifier that drives this deployment."},"createdAt":{"description":"Time this deployment was created.","type":"string"},"updatedAt":{"description":"Time this deployment was last updated.","type":"string"},"kind":{"type":"string","description":"This deployment belongs to a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this deployment belongs to."},"meta":{"type":"object","properties":{"bundleSha256":{"type":"string","description":"SHA-256 digest of the built worker bundle."},"outboundAllowlist":{"type":"array","items":{"type":"string"},"description":"Hostnames the worker is allowed to call outbound."},"kind":{"description":"Optional worker kind, currently only custom-integration.","type":"string","enum":["custom-integration"]}},"required":["bundleSha256","outboundAllowlist"],"additionalProperties":false,"description":"Worker-specific deployment metadata."}},"required":["uuid","workspaceUuid","sourceS3Path","bundleS3Path","status","buildLogS3Filename","errorMessage","url","userUuid","promotedAt","promotedByUserUuid","finishedAt","temporalWorkflowId","createdAt","updatedAt","kind","workerUuid","meta"],"additionalProperties":false}],"title":"Deployment","description":"Deployment details.","type":"object"}},"required":["deployment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/deployments/{uuid}/build-log-url":{"get":{"operationId":"getHostingDeploymentsByUuidBuildLogUrl","summary":"Get deployment build log URL","description":"Get a signed URL to download a deployment's build log (GET /hosting/deployments/{uuid}/build-log-url).","tags":["Hosting - Deployments"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Deployment identifier."},"required":true,"description":"Deployment identifier."}],"responses":{"200":{"description":"Get deployment build log URL","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","title":"URL","description":"Pre-signed S3 URL pointing to the deployment build log file."}},"required":["url"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/deployments/{uuid}/source-archive-url":{"get":{"operationId":"getHostingDeploymentsByUuidSourceArchiveUrl","summary":"Get deployment source archive URL","description":"Get a signed URL to download a deployment's source archive (GET /hosting/deployments/{uuid}/source-archive-url).","tags":["Hosting - Deployments"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Deployment identifier."},"required":true,"description":"Deployment identifier."}],"responses":{"200":{"description":"Get deployment source archive URL","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","title":"URL","description":"Pre-signed S3 URL pointing to a tar.gz of the source files uploaded when the deployment was created (pre-build)."}},"required":["url"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/env-vars":{"get":{"operationId":"getHostingEnvVars","summary":"List env vars","description":"List environment variables for an app or worker (GET /hosting/env-vars).","tags":["Hosting - Env Vars"],"parameters":[{"in":"query","name":"appUuid","schema":{"title":"App UUID","description":"Identifier of the app whose env vars to list.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Identifier of the app whose env vars to list."},{"in":"query","name":"workerUuid","schema":{"title":"Worker UUID","description":"Identifier of the worker whose env vars to list.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Identifier of the worker whose env vars to list."}],"responses":{"200":{"description":"List env vars","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"envVars":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Environment variable identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this environment variable belongs to."},"key":{"type":"string","description":"Environment variable name."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Environment variable value, if it can be returned."},"isSecret":{"type":"boolean","description":"Whether this value is encrypted at rest and hidden after write."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this environment variable."},"createdAt":{"description":"Time this environment variable was created.","type":"string"},"updatedAt":{"description":"Time this environment variable was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this environment variable was deleted, if it has been."},"kind":{"type":"string","description":"This environment variable belongs to an app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this environment variable belongs to."}},"required":["uuid","workspaceUuid","key","value","isSecret","userUuid","createdAt","updatedAt","deletedAt","kind","appUuid"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Environment variable identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this environment variable belongs to."},"key":{"type":"string","description":"Environment variable name."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Environment variable value, if it can be returned."},"isSecret":{"type":"boolean","description":"Whether this value is encrypted at rest and hidden after write."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this environment variable."},"createdAt":{"description":"Time this environment variable was created.","type":"string"},"updatedAt":{"description":"Time this environment variable was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this environment variable was deleted, if it has been."},"kind":{"type":"string","description":"This environment variable belongs to a worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this environment variable belongs to."}},"required":["uuid","workspaceUuid","key","value","isSecret","userUuid","createdAt","updatedAt","deletedAt","kind","workerUuid"],"additionalProperties":false}],"type":"object"},"title":"Environment variables","description":"List of environment variables (secrets are masked)."}},"required":["envVars"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"operationId":"postHostingEnvVars","summary":"Create env var","description":"Create an environment variable for an app or worker (POST /hosting/env-vars).","tags":["Hosting - Env Vars"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Create the environment variable on an app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"App UUID","description":"Identifier of the app this env var belongs to."},"key":{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$","title":"Key","description":"Environment variable key (must start with `VITE_`)."},"value":{"type":"string","maxLength":8192,"title":"Value","description":"Environment variable value."},"isSecret":{"type":"boolean","title":"Is secret","description":"When true, the value is encrypted at rest and never returned by the API."}},"required":["kind","appUuid","key","value","isSecret"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Create the environment variable on a worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Worker UUID","description":"Identifier of the worker this env var belongs to."},"key":{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$","title":"Key","description":"Environment variable key."},"value":{"type":"string","maxLength":8192,"title":"Value","description":"Environment variable value."},"isSecret":{"type":"boolean","title":"Is secret","description":"When true, the value is encrypted at rest and never returned by the API."}},"required":["kind","workerUuid","key","value","isSecret"],"additionalProperties":false}],"title":"Request body","description":"Request body schema.","type":"object"}}}},"responses":{"200":{"description":"Create env var","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"envVar":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Environment variable identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this environment variable belongs to."},"key":{"type":"string","description":"Environment variable name."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Environment variable value, if it can be returned."},"isSecret":{"type":"boolean","description":"Whether this value is encrypted at rest and hidden after write."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this environment variable."},"createdAt":{"description":"Time this environment variable was created.","type":"string"},"updatedAt":{"description":"Time this environment variable was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this environment variable was deleted, if it has been."},"kind":{"type":"string","description":"This environment variable belongs to an app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this environment variable belongs to."}},"required":["uuid","workspaceUuid","key","value","isSecret","userUuid","createdAt","updatedAt","deletedAt","kind","appUuid"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Environment variable identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this environment variable belongs to."},"key":{"type":"string","description":"Environment variable name."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Environment variable value, if it can be returned."},"isSecret":{"type":"boolean","description":"Whether this value is encrypted at rest and hidden after write."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this environment variable."},"createdAt":{"description":"Time this environment variable was created.","type":"string"},"updatedAt":{"description":"Time this environment variable was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this environment variable was deleted, if it has been."},"kind":{"type":"string","description":"This environment variable belongs to a worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this environment variable belongs to."}},"required":["uuid","workspaceUuid","key","value","isSecret","userUuid","createdAt","updatedAt","deletedAt","kind","workerUuid"],"additionalProperties":false}],"title":"Environment variable","description":"Newly created environment variable.","type":"object"}},"required":["envVar"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/env-vars/{uuid}":{"patch":{"operationId":"patchHostingEnvVarsByUuid","summary":"Update env var","description":"Update an environment variable (PATCH /hosting/env-vars/{uuid}).","tags":["Hosting - Env Vars"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Env var UUID","description":"Identifier of the environment variable to update."},"required":true,"description":"Identifier of the environment variable to update."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","maxLength":8192,"title":"Value","description":"Environment variable value."},"isSecret":{"type":"boolean","title":"Is secret","description":"When true, the value is encrypted at rest and never returned by the API."}},"required":["value","isSecret"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update env var","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"envVar":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Environment variable identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this environment variable belongs to."},"key":{"type":"string","description":"Environment variable name."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Environment variable value, if it can be returned."},"isSecret":{"type":"boolean","description":"Whether this value is encrypted at rest and hidden after write."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this environment variable."},"createdAt":{"description":"Time this environment variable was created.","type":"string"},"updatedAt":{"description":"Time this environment variable was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this environment variable was deleted, if it has been."},"kind":{"type":"string","description":"This environment variable belongs to an app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this environment variable belongs to."}},"required":["uuid","workspaceUuid","key","value","isSecret","userUuid","createdAt","updatedAt","deletedAt","kind","appUuid"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Environment variable identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this environment variable belongs to."},"key":{"type":"string","description":"Environment variable name."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Environment variable value, if it can be returned."},"isSecret":{"type":"boolean","description":"Whether this value is encrypted at rest and hidden after write."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this environment variable."},"createdAt":{"description":"Time this environment variable was created.","type":"string"},"updatedAt":{"description":"Time this environment variable was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this environment variable was deleted, if it has been."},"kind":{"type":"string","description":"This environment variable belongs to a worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this environment variable belongs to."}},"required":["uuid","workspaceUuid","key","value","isSecret","userUuid","createdAt","updatedAt","deletedAt","kind","workerUuid"],"additionalProperties":false}],"title":"Environment variable","description":"Updated environment variable.","type":"object"}},"required":["envVar"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteHostingEnvVarsByUuid","summary":"Remove env var","description":"Remove an environment variable (DELETE /hosting/env-vars/{uuid}).","tags":["Hosting - Env Vars"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Env var UUID","description":"Identifier of the environment variable to remove."},"required":true,"description":"Identifier of the environment variable to remove."}],"responses":{"200":{"description":"Remove env var","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/custom-domains/list":{"get":{"operationId":"getHostingCustomDomainsList","summary":"List custom domains","description":"List custom domains attached to an app or worker (GET /hosting/custom-domains/list).","tags":["Hosting - Custom Domains"],"parameters":[{"in":"query","name":"appUuid","schema":{"title":"App UUID","description":"Identifier of the app whose custom domains to list.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Identifier of the app whose custom domains to list."},{"in":"query","name":"workerUuid","schema":{"title":"Worker UUID","description":"Identifier of the worker whose custom domains to list.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Identifier of the worker whose custom domains to list."}],"responses":{"200":{"description":"List custom domains","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"customDomains":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Custom domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this custom domain belongs to."},"hostname":{"type":"string","description":"Hostname pointed at this app or worker."},"status":{"type":"string","enum":["pending_verification","verifying","active","failed","deactivated"],"description":"Verification and routing status of this custom domain."},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this hostname was verified, if it has been."},"verification":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string","enum":["CNAME","TXT"],"description":"DNS record type to create for verification."},"name":{"type":"string","description":"DNS name of the verification record."},"value":{"type":"string","description":"Expected value of the verification record."}},"required":["recordType","name","value"],"additionalProperties":false},"description":"DNS records the customer must create to prove ownership."},"cnameTarget":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hostname this custom domain should CNAME to, once verified."},"chargedUntil":{"description":"Time through which this custom domain is billed.","type":"string"},"createdAt":{"description":"Time this custom domain was created.","type":"string"},"updatedAt":{"description":"Time this custom domain was last updated.","type":"string"},"kind":{"type":"string","description":"This custom domain is attached to an app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this custom domain is attached to."}},"required":["uuid","workspaceUuid","hostname","status","verifiedAt","verification","cnameTarget","chargedUntil","createdAt","updatedAt","kind","appUuid"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Custom domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this custom domain belongs to."},"hostname":{"type":"string","description":"Hostname pointed at this app or worker."},"status":{"type":"string","enum":["pending_verification","verifying","active","failed","deactivated"],"description":"Verification and routing status of this custom domain."},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this hostname was verified, if it has been."},"verification":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string","enum":["CNAME","TXT"],"description":"DNS record type to create for verification."},"name":{"type":"string","description":"DNS name of the verification record."},"value":{"type":"string","description":"Expected value of the verification record."}},"required":["recordType","name","value"],"additionalProperties":false},"description":"DNS records the customer must create to prove ownership."},"cnameTarget":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hostname this custom domain should CNAME to, once verified."},"chargedUntil":{"description":"Time through which this custom domain is billed.","type":"string"},"createdAt":{"description":"Time this custom domain was created.","type":"string"},"updatedAt":{"description":"Time this custom domain was last updated.","type":"string"},"kind":{"type":"string","description":"This custom domain is attached to a worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this custom domain is attached to."}},"required":["uuid","workspaceUuid","hostname","status","verifiedAt","verification","cnameTarget","chargedUntil","createdAt","updatedAt","kind","workerUuid"],"additionalProperties":false}],"type":"object"},"title":"Custom domains","description":"List of custom domains attached to the subject."}},"required":["customDomains"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/custom-domains":{"post":{"operationId":"postHostingCustomDomains","summary":"Attach custom domain","description":"Attach a custom domain to an app or worker (POST /hosting/custom-domains).","tags":["Hosting - Custom Domains"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Attach the domain to an app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"App UUID","description":"Identifier of the app this custom domain attaches to."},"hostname":{"title":"Hostname","description":"Customer-controlled subdomain to attach (e.g. app.example.com). Must be a valid FQDN with at least three DNS labels, must not include a protocol or path, and must not be under a Cargo-owned domain. Normalised to lowercase.","type":"string","minLength":4,"maxLength":253}},"required":["kind","appUuid","hostname"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Attach the domain to a worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Worker UUID","description":"Identifier of the worker this custom domain attaches to."},"hostname":{"title":"Hostname","description":"Customer-controlled subdomain to attach (e.g. app.example.com). Must be a valid FQDN with at least three DNS labels, must not include a protocol or path, and must not be under a Cargo-owned domain. Normalised to lowercase.","type":"string","minLength":4,"maxLength":253}},"required":["kind","workerUuid","hostname"],"additionalProperties":false}],"title":"Request body","description":"Request body schema.","type":"object"}}}},"responses":{"200":{"description":"Attach custom domain","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"customDomain":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Custom domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this custom domain belongs to."},"hostname":{"type":"string","description":"Hostname pointed at this app or worker."},"status":{"type":"string","enum":["pending_verification","verifying","active","failed","deactivated"],"description":"Verification and routing status of this custom domain."},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this hostname was verified, if it has been."},"verification":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string","enum":["CNAME","TXT"],"description":"DNS record type to create for verification."},"name":{"type":"string","description":"DNS name of the verification record."},"value":{"type":"string","description":"Expected value of the verification record."}},"required":["recordType","name","value"],"additionalProperties":false},"description":"DNS records the customer must create to prove ownership."},"cnameTarget":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hostname this custom domain should CNAME to, once verified."},"chargedUntil":{"description":"Time through which this custom domain is billed.","type":"string"},"createdAt":{"description":"Time this custom domain was created.","type":"string"},"updatedAt":{"description":"Time this custom domain was last updated.","type":"string"},"kind":{"type":"string","description":"This custom domain is attached to an app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this custom domain is attached to."}},"required":["uuid","workspaceUuid","hostname","status","verifiedAt","verification","cnameTarget","chargedUntil","createdAt","updatedAt","kind","appUuid"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Custom domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this custom domain belongs to."},"hostname":{"type":"string","description":"Hostname pointed at this app or worker."},"status":{"type":"string","enum":["pending_verification","verifying","active","failed","deactivated"],"description":"Verification and routing status of this custom domain."},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this hostname was verified, if it has been."},"verification":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string","enum":["CNAME","TXT"],"description":"DNS record type to create for verification."},"name":{"type":"string","description":"DNS name of the verification record."},"value":{"type":"string","description":"Expected value of the verification record."}},"required":["recordType","name","value"],"additionalProperties":false},"description":"DNS records the customer must create to prove ownership."},"cnameTarget":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hostname this custom domain should CNAME to, once verified."},"chargedUntil":{"description":"Time through which this custom domain is billed.","type":"string"},"createdAt":{"description":"Time this custom domain was created.","type":"string"},"updatedAt":{"description":"Time this custom domain was last updated.","type":"string"},"kind":{"type":"string","description":"This custom domain is attached to a worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this custom domain is attached to."}},"required":["uuid","workspaceUuid","hostname","status","verifiedAt","verification","cnameTarget","chargedUntil","createdAt","updatedAt","kind","workerUuid"],"additionalProperties":false}],"title":"Custom domain","description":"Newly attached custom domain.","type":"object"}},"required":["customDomain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/custom-domains/{uuid}":{"get":{"operationId":"getHostingCustomDomainsByUuid","summary":"Get custom domain","description":"Get a custom domain by UUID (GET /hosting/custom-domains/{uuid}).","tags":["Hosting - Custom Domains"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Custom domain identifier."},"required":true,"description":"Custom domain identifier."}],"responses":{"200":{"description":"Get custom domain","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"customDomain":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Custom domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this custom domain belongs to."},"hostname":{"type":"string","description":"Hostname pointed at this app or worker."},"status":{"type":"string","enum":["pending_verification","verifying","active","failed","deactivated"],"description":"Verification and routing status of this custom domain."},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this hostname was verified, if it has been."},"verification":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string","enum":["CNAME","TXT"],"description":"DNS record type to create for verification."},"name":{"type":"string","description":"DNS name of the verification record."},"value":{"type":"string","description":"Expected value of the verification record."}},"required":["recordType","name","value"],"additionalProperties":false},"description":"DNS records the customer must create to prove ownership."},"cnameTarget":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hostname this custom domain should CNAME to, once verified."},"chargedUntil":{"description":"Time through which this custom domain is billed.","type":"string"},"createdAt":{"description":"Time this custom domain was created.","type":"string"},"updatedAt":{"description":"Time this custom domain was last updated.","type":"string"},"kind":{"type":"string","description":"This custom domain is attached to an app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this custom domain is attached to."}},"required":["uuid","workspaceUuid","hostname","status","verifiedAt","verification","cnameTarget","chargedUntil","createdAt","updatedAt","kind","appUuid"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Custom domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this custom domain belongs to."},"hostname":{"type":"string","description":"Hostname pointed at this app or worker."},"status":{"type":"string","enum":["pending_verification","verifying","active","failed","deactivated"],"description":"Verification and routing status of this custom domain."},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this hostname was verified, if it has been."},"verification":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string","enum":["CNAME","TXT"],"description":"DNS record type to create for verification."},"name":{"type":"string","description":"DNS name of the verification record."},"value":{"type":"string","description":"Expected value of the verification record."}},"required":["recordType","name","value"],"additionalProperties":false},"description":"DNS records the customer must create to prove ownership."},"cnameTarget":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hostname this custom domain should CNAME to, once verified."},"chargedUntil":{"description":"Time through which this custom domain is billed.","type":"string"},"createdAt":{"description":"Time this custom domain was created.","type":"string"},"updatedAt":{"description":"Time this custom domain was last updated.","type":"string"},"kind":{"type":"string","description":"This custom domain is attached to a worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this custom domain is attached to."}},"required":["uuid","workspaceUuid","hostname","status","verifiedAt","verification","cnameTarget","chargedUntil","createdAt","updatedAt","kind","workerUuid"],"additionalProperties":false}],"title":"Custom domain","description":"Custom domain details.","type":"object"}},"required":["customDomain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteHostingCustomDomainsByUuid","summary":"Detach custom domain","description":"Detach a custom domain from an app or worker (DELETE /hosting/custom-domains/{uuid}).","tags":["Hosting - Custom Domains"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Custom domain identifier to detach."},"required":true,"description":"Custom domain identifier to detach."}],"responses":{"200":{"description":"Detach custom domain","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["detached","deactivating"],"title":"Outcome","description":"`detached` once teardown completed; `deactivating` when CloudFront is still propagating and the customer should retry."}},"required":["outcome"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/custom-domains/{uuid}/refresh-status":{"post":{"operationId":"postHostingCustomDomainsByUuidRefreshStatus","summary":"Refresh custom domain status","description":"Re-poll the provider for a custom domain's status (POST /hosting/custom-domains/{uuid}/refresh-status).","tags":["Hosting - Custom Domains"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Custom domain identifier to refresh."},"required":true,"description":"Custom domain identifier to refresh."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Refresh custom domain status","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"customDomain":{"oneOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Custom domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this custom domain belongs to."},"hostname":{"type":"string","description":"Hostname pointed at this app or worker."},"status":{"type":"string","enum":["pending_verification","verifying","active","failed","deactivated"],"description":"Verification and routing status of this custom domain."},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this hostname was verified, if it has been."},"verification":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string","enum":["CNAME","TXT"],"description":"DNS record type to create for verification."},"name":{"type":"string","description":"DNS name of the verification record."},"value":{"type":"string","description":"Expected value of the verification record."}},"required":["recordType","name","value"],"additionalProperties":false},"description":"DNS records the customer must create to prove ownership."},"cnameTarget":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hostname this custom domain should CNAME to, once verified."},"chargedUntil":{"description":"Time through which this custom domain is billed.","type":"string"},"createdAt":{"description":"Time this custom domain was created.","type":"string"},"updatedAt":{"description":"Time this custom domain was last updated.","type":"string"},"kind":{"type":"string","description":"This custom domain is attached to an app.","enum":["app"]},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App this custom domain is attached to."}},"required":["uuid","workspaceUuid","hostname","status","verifiedAt","verification","cnameTarget","chargedUntil","createdAt","updatedAt","kind","appUuid"],"additionalProperties":false},{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Custom domain identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this custom domain belongs to."},"hostname":{"type":"string","description":"Hostname pointed at this app or worker."},"status":{"type":"string","enum":["pending_verification","verifying","active","failed","deactivated"],"description":"Verification and routing status of this custom domain."},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this hostname was verified, if it has been."},"verification":{"type":"array","items":{"type":"object","properties":{"recordType":{"type":"string","enum":["CNAME","TXT"],"description":"DNS record type to create for verification."},"name":{"type":"string","description":"DNS name of the verification record."},"value":{"type":"string","description":"Expected value of the verification record."}},"required":["recordType","name","value"],"additionalProperties":false},"description":"DNS records the customer must create to prove ownership."},"cnameTarget":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hostname this custom domain should CNAME to, once verified."},"chargedUntil":{"description":"Time through which this custom domain is billed.","type":"string"},"createdAt":{"description":"Time this custom domain was created.","type":"string"},"updatedAt":{"description":"Time this custom domain was last updated.","type":"string"},"kind":{"type":"string","description":"This custom domain is attached to a worker.","enum":["worker"]},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker this custom domain is attached to."}},"required":["uuid","workspaceUuid","hostname","status","verifiedAt","verification","cnameTarget","chargedUntil","createdAt","updatedAt","kind","workerUuid"],"additionalProperties":false}],"title":"Custom domain","description":"Custom domain after the status refresh.","type":"object"}},"required":["customDomain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/analytics/list":{"post":{"operationId":"postHostingAnalyticsList","summary":"List analytics events","description":"List analytics events captured for a hosted app (POST /hosting/analytics/list).","tags":["Hosting - Analytics"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","title":"App UUID","description":"App whose analytics events to list."},"kinds":{"title":"Kinds","description":"Event kinds to include.","type":"array","items":{"type":"string","enum":["pageview","error","custom"]}},"search":{"title":"Search","description":"Match against event name, pathname, or error message.","type":"string","minLength":1,"maxLength":512},"occurredAfter":{"title":"Occurred after","description":"Include events that occurred after this ISO timestamp.","type":"string"},"occurredBefore":{"title":"Occurred before","description":"Include events that occurred before this ISO timestamp.","type":"string"},"limit":{"default":100,"title":"Limit","description":"Maximum number of events to return.","type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"title":"Offset","description":"Number of events to skip.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["appUuid"],"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List analytics events","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Analytics event identifier."},"kind":{"type":"string","enum":["pageview","error","custom"],"description":"Kind of analytics event that was recorded."},"name":{"type":"string","minLength":1,"maxLength":512,"description":"Event name reported by the SDK."},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"Time this event occurred."},"attributes":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},{"type":"null"}],"description":"Custom key-value attributes attached to the event, if any."},"errorMessage":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"description":"Error message, if this is an error event."},"errorStack":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"description":"Error stack trace, if this is an error event."},"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App that emitted this event."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this event belongs to."},"anonymousId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Anonymous visitor identifier assigned by the SDK."},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Browser session identifier assigned by the SDK."},"userUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Cargo user, if they were signed in when the event fired."},"deploymentUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"App deployment that served the page."},"pathname":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"description":"Page pathname, if reported."},"host":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Page hostname, if reported."},"referrer":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"description":"Document referrer, if reported."},"locale":{"anyOf":[{"type":"string","maxLength":35},{"type":"null"}],"description":"Browser locale, if reported."},"screenWidth":{"anyOf":[{"type":"integer","minimum":0,"maximum":65535},{"type":"null"}],"description":"Viewport width in pixels, if reported."},"screenHeight":{"anyOf":[{"type":"integer","minimum":0,"maximum":65535},{"type":"null"}],"description":"Viewport height in pixels, if reported."},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-agent string stamped by the server, if known."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Country inferred from the client IP, if known."},"remoteIp":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Truncated client IP stamped by the server, if known."}},"required":["uuid","kind","name","occurredAt","attributes","errorMessage","errorStack","appUuid","workspaceUuid","anonymousId","sessionId","userUuid","deploymentUuid","pathname","host","referrer","locale","screenWidth","screenHeight","userAgent","country","remoteIp"],"additionalProperties":false},"title":"Events","description":"Analytics events matching the filters."}},"required":["events"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/analytics/count":{"post":{"operationId":"postHostingAnalyticsCount","summary":"Count analytics events","description":"Count analytics events captured for a hosted app (POST /hosting/analytics/count).","tags":["Hosting - Analytics"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","title":"App UUID","description":"App whose analytics events to count."},"kinds":{"title":"Kinds","description":"Event kinds to include.","type":"array","items":{"type":"string","enum":["pageview","error","custom"]}},"search":{"title":"Search","description":"Match against event name, pathname, or error message.","type":"string","minLength":1,"maxLength":512},"occurredAfter":{"title":"Occurred after","description":"Count events that occurred after this ISO timestamp.","type":"string"},"occurredBefore":{"title":"Occurred before","description":"Count events that occurred before this ISO timestamp.","type":"string"}},"required":["appUuid"],"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Count analytics events","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Count","description":"Number of analytics events matching the filters."}},"required":["count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/logs/list":{"post":{"operationId":"postHostingLogsList","summary":"List logs","description":"List runtime logs for a hosted worker (POST /hosting/logs/list).","tags":["Hosting - Logs"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","title":"Worker UUID","description":"Worker whose logs to list."},"runUuid":{"title":"Run UUID","description":"When set, only logs for this run are returned.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"levels":{"title":"Levels","description":"Log levels to include.","type":"array","items":{"type":"string","enum":["log","info","warn","error","debug"]}},"search":{"title":"Search","description":"Match against the log message.","type":"string","minLength":1,"maxLength":512},"occurredAfter":{"title":"Occurred after","description":"Include logs that occurred after this ISO timestamp.","type":"string"},"occurredBefore":{"title":"Occurred before","description":"Include logs that occurred before this ISO timestamp.","type":"string"},"limit":{"title":"Limit","description":"Maximum number of log lines to return.","type":"integer","minimum":1,"maximum":500},"offset":{"title":"Offset","description":"Number of log lines to skip.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workerUuid"],"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List logs","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"logs":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Log line identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this log line belongs to."},"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker that emitted this log line."},"runUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Worker run that produced this log line."},"level":{"type":"string","enum":["log","info","warn","error","debug"],"description":"Severity of this log line."},"message":{"type":"string","maxLength":8192,"description":"Log message text."},"occurredAt":{"description":"Time this log line was emitted.","type":"string"}},"required":["uuid","workspaceUuid","workerUuid","runUuid","level","message","occurredAt"],"additionalProperties":false},"title":"Logs","description":"Log lines matching the filters."}},"required":["logs"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/hosting/logs/count":{"post":{"operationId":"postHostingLogsCount","summary":"Count logs","description":"Count runtime logs for a hosted worker (POST /hosting/logs/count).","tags":["Hosting - Logs"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workerUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","title":"Worker UUID","description":"Worker whose logs to count."},"runUuid":{"title":"Run UUID","description":"When set, only logs for this run are counted.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"levels":{"title":"Levels","description":"Log levels to include.","type":"array","items":{"type":"string","enum":["log","info","warn","error","debug"]}},"search":{"title":"Search","description":"Match against the log message.","type":"string","minLength":1,"maxLength":512},"occurredAfter":{"title":"Occurred after","description":"Count logs that occurred after this ISO timestamp.","type":"string"},"occurredBefore":{"title":"Occurred before","description":"Count logs that occurred before this ISO timestamp.","type":"string"}},"required":["workerUuid"],"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Count logs","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Count","description":"Number of logs matching the filters."}},"required":["count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/oauth/grants/list":{"get":{"operationId":"getOauthGrantsList","summary":"List OAuth grants","description":"List live OAuth grants for a protected resource (GET /oauth/grants/list).","tags":["OAuth - Grants"],"parameters":[{"in":"query","name":"resource","schema":{"type":"string","format":"uri","title":"Resource","description":"Protected resource URI the grants belong to."},"required":true,"description":"Protected resource URI the grants belong to."}],"responses":{"200":{"description":"List OAuth grants","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"clientId":{"type":"string"},"clientName":{"type":"string"},"userUuid":{"type":"string"},"workspaceUuid":{"type":"string"},"resource":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"}},"required":["uuid","clientId","clientName","userUuid","workspaceUuid","resource","createdAt","expiresAt"],"additionalProperties":false},"title":"OAuth grants","description":"Live OAuth grants for this resource."}},"required":["grants"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/oauth/grants/{grantUuid}":{"delete":{"operationId":"deleteOauthGrantsByGrantUuid","summary":"Revoke OAuth grant","description":"Revoke a live OAuth grant for a protected resource (DELETE /oauth/grants/{grantUuid}).","tags":["OAuth - Grants"],"parameters":[{"in":"query","name":"resource","schema":{"type":"string","format":"uri","title":"Resource","description":"Protected resource URI the grant belongs to."},"required":true,"description":"Protected resource URI the grant belongs to."},{"in":"path","name":"grantUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Grant UUID","description":"OAuth grant identifier."},"required":true,"description":"OAuth grant identifier."}],"responses":{"200":{"description":"Revoke OAuth grant","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/mailboxes":{"get":{"operationId":"getMailboxManagementMailboxes","summary":"List mailboxes","description":"List the workspace's mailboxes (GET /mailboxManagement/mailboxes).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"in":"query","name":"domainUuid","schema":{"title":"Domain UUID","description":"Only return mailboxes hosted on this domain.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Only return mailboxes hosted on this domain."},{"in":"query","name":"folderUuid","schema":{"title":"Folder UUID","description":"Filter by folder. Use null to list mailboxes that are not in any folder.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"description":"Filter by folder. Use null to list mailboxes that are not in any folder."},{"in":"query","name":"statuses","schema":{"title":"Statuses","description":"Optional status filter.","type":"array","items":{"type":"string","enum":["pending","active","inactive"]}},"description":"Optional status filter."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of mailboxes to return.","type":"integer","exclusiveMinimum":0,"maximum":1000},"description":"Maximum number of mailboxes to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of mailboxes to skip.","type":"integer","minimum":0,"maximum":9007199254740991},"description":"Number of mailboxes to skip."}],"responses":{"200":{"description":"List mailboxes","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mailboxes":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this mailbox belongs to."},"domainUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Purchased sending domain this mailbox is on, if any."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this mailbox is filed under, if any."},"provider":{"type":"string","enum":["mailpool"],"description":"Mailbox provider that provisions this mailbox."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this mailbox."},"credentials":{"type":"object","properties":{"smtp":{"description":"SMTP credentials used to send mail, if this mailbox uses SMTP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false},"imap":{"description":"IMAP credentials used to read mail, if this mailbox uses IMAP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false}},"additionalProperties":false,"description":"Transport credentials used to send and receive mail."},"email":{"type":"string","description":"Email address of this mailbox."},"firstName":{"type":"string","description":"First name shown on outbound mail."},"lastName":{"type":"string","description":"Last name shown on outbound mail."},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML signature appended to outbound mail, if set."},"type":{"type":"string","enum":["google","outlook","shared","private"],"description":"Kind of mailbox (Google, Outlook, shared, or private)."},"transport":{"type":"string","enum":["smtp","graph"],"description":"Transport used to send mail from this mailbox."},"status":{"type":"string","enum":["pending","active","inactive"],"description":"Provisioning status of this mailbox."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error code, if the mailbox is in a failed state."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error message, if the mailbox is in a failed state."},"warmupStatus":{"type":"string","enum":["disabled","pending","active","paused","failed"],"description":"Warm-up-network status of this mailbox."},"warmupDailyTarget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":40},{"type":"null"}],"description":"Warm-up messages per day at full ramp, if warm-up is configured."},"warmupStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time warm-up started, if it has."},"dailySendLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":40},{"type":"null"}],"description":"Explicit daily outreach ceiling for this mailbox, if set."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this mailbox."},"chargedUntil":{"description":"Time through which this mailbox is billed.","type":"string"},"inboundUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the inbox, if inbound sync has run."},"inboundLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last inbox UID processed by inbound reply sync, if any."},"inboundJunkUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the junk folder, if inbound sync has run."},"inboundJunkLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last junk-folder UID processed by inbound reply sync, if any."},"inboundSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time inbound mail was last synced, if it has been."},"createdAt":{"description":"Time this mailbox was created.","type":"string"},"updatedAt":{"description":"Time this mailbox was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this mailbox was deleted, if it has been."}},"required":["uuid","workspaceUuid","domainUuid","folderUuid","provider","meta","credentials","email","firstName","lastName","signature","type","transport","status","errorCode","errorMessage","warmupStatus","warmupDailyTarget","warmupStartedAt","dailySendLimit","userUuid","chargedUntil","inboundUidValidity","inboundLastUid","inboundJunkUidValidity","inboundJunkLastUid","inboundSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"Mailboxes","description":"Mailboxes owned by the workspace."}},"required":["mailboxes"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"operationId":"postMailboxManagementMailboxes","summary":"Create mailbox","description":"Provision one mailbox on a domain the workspace owns (POST /mailboxManagement/mailboxes).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domainUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Domain UUID","description":"Domain the mailbox is created on."},"type":{"type":"string","enum":["google","outlook","shared","private"],"title":"Type","description":"Mailbox flavour to provision. Decides which transport delivers from it."},"username":{"title":"Username","description":"Local part of the address, e.g. `jane` for jane@acme.com.","type":"string","minLength":1,"maxLength":64},"firstName":{"type":"string","minLength":1,"maxLength":64,"title":"First name","description":"Sender first name shown in the From header."},"lastName":{"type":"string","minLength":1,"maxLength":64,"title":"Last name","description":"Sender last name shown in the From header."},"signature":{"title":"Signature","description":"HTML signature stored on the mailbox. Not yet appended to outgoing messages.","type":"string","maxLength":10000},"folderUuid":{"title":"Folder UUID","description":"Folder to create the mailbox in. Null means the root.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"required":["domainUuid","type","username","firstName","lastName"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create mailbox","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this mailbox belongs to."},"domainUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Purchased sending domain this mailbox is on, if any."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this mailbox is filed under, if any."},"provider":{"type":"string","enum":["mailpool"],"description":"Mailbox provider that provisions this mailbox."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this mailbox."},"credentials":{"type":"object","properties":{"smtp":{"description":"SMTP credentials used to send mail, if this mailbox uses SMTP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false},"imap":{"description":"IMAP credentials used to read mail, if this mailbox uses IMAP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false}},"additionalProperties":false,"description":"Transport credentials used to send and receive mail."},"email":{"type":"string","description":"Email address of this mailbox."},"firstName":{"type":"string","description":"First name shown on outbound mail."},"lastName":{"type":"string","description":"Last name shown on outbound mail."},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML signature appended to outbound mail, if set."},"type":{"type":"string","enum":["google","outlook","shared","private"],"description":"Kind of mailbox (Google, Outlook, shared, or private)."},"transport":{"type":"string","enum":["smtp","graph"],"description":"Transport used to send mail from this mailbox."},"status":{"type":"string","enum":["pending","active","inactive"],"description":"Provisioning status of this mailbox."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error code, if the mailbox is in a failed state."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error message, if the mailbox is in a failed state."},"warmupStatus":{"type":"string","enum":["disabled","pending","active","paused","failed"],"description":"Warm-up-network status of this mailbox."},"warmupDailyTarget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":40},{"type":"null"}],"description":"Warm-up messages per day at full ramp, if warm-up is configured."},"warmupStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time warm-up started, if it has."},"dailySendLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":40},{"type":"null"}],"description":"Explicit daily outreach ceiling for this mailbox, if set."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this mailbox."},"chargedUntil":{"description":"Time through which this mailbox is billed.","type":"string"},"inboundUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the inbox, if inbound sync has run."},"inboundLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last inbox UID processed by inbound reply sync, if any."},"inboundJunkUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the junk folder, if inbound sync has run."},"inboundJunkLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last junk-folder UID processed by inbound reply sync, if any."},"inboundSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time inbound mail was last synced, if it has been."},"createdAt":{"description":"Time this mailbox was created.","type":"string"},"updatedAt":{"description":"Time this mailbox was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this mailbox was deleted, if it has been."}},"required":["uuid","workspaceUuid","domainUuid","folderUuid","provider","meta","credentials","email","firstName","lastName","signature","type","transport","status","errorCode","errorMessage","warmupStatus","warmupDailyTarget","warmupStartedAt","dailySendLimit","userUuid","chargedUntil","inboundUidValidity","inboundLastUid","inboundJunkUidValidity","inboundJunkLastUid","inboundSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Mailbox","description":"Newly provisioned mailbox. It starts `pending` until the provider issues credentials."}},"required":["mailbox"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/mailboxes/{uuid}":{"get":{"operationId":"getMailboxManagementMailboxesByUuid","summary":"Get mailbox","description":"Get a mailbox by UUID (GET /mailboxManagement/mailboxes/{uuid}).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Mailbox identifier."},"required":true,"description":"Mailbox identifier."}],"responses":{"200":{"description":"Get mailbox","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this mailbox belongs to."},"domainUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Purchased sending domain this mailbox is on, if any."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this mailbox is filed under, if any."},"provider":{"type":"string","enum":["mailpool"],"description":"Mailbox provider that provisions this mailbox."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this mailbox."},"credentials":{"type":"object","properties":{"smtp":{"description":"SMTP credentials used to send mail, if this mailbox uses SMTP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false},"imap":{"description":"IMAP credentials used to read mail, if this mailbox uses IMAP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false}},"additionalProperties":false,"description":"Transport credentials used to send and receive mail."},"email":{"type":"string","description":"Email address of this mailbox."},"firstName":{"type":"string","description":"First name shown on outbound mail."},"lastName":{"type":"string","description":"Last name shown on outbound mail."},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML signature appended to outbound mail, if set."},"type":{"type":"string","enum":["google","outlook","shared","private"],"description":"Kind of mailbox (Google, Outlook, shared, or private)."},"transport":{"type":"string","enum":["smtp","graph"],"description":"Transport used to send mail from this mailbox."},"status":{"type":"string","enum":["pending","active","inactive"],"description":"Provisioning status of this mailbox."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error code, if the mailbox is in a failed state."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error message, if the mailbox is in a failed state."},"warmupStatus":{"type":"string","enum":["disabled","pending","active","paused","failed"],"description":"Warm-up-network status of this mailbox."},"warmupDailyTarget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":40},{"type":"null"}],"description":"Warm-up messages per day at full ramp, if warm-up is configured."},"warmupStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time warm-up started, if it has."},"dailySendLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":40},{"type":"null"}],"description":"Explicit daily outreach ceiling for this mailbox, if set."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this mailbox."},"chargedUntil":{"description":"Time through which this mailbox is billed.","type":"string"},"inboundUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the inbox, if inbound sync has run."},"inboundLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last inbox UID processed by inbound reply sync, if any."},"inboundJunkUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the junk folder, if inbound sync has run."},"inboundJunkLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last junk-folder UID processed by inbound reply sync, if any."},"inboundSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time inbound mail was last synced, if it has been."},"createdAt":{"description":"Time this mailbox was created.","type":"string"},"updatedAt":{"description":"Time this mailbox was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this mailbox was deleted, if it has been."}},"required":["uuid","workspaceUuid","domainUuid","folderUuid","provider","meta","credentials","email","firstName","lastName","signature","type","transport","status","errorCode","errorMessage","warmupStatus","warmupDailyTarget","warmupStartedAt","dailySendLimit","userUuid","chargedUntil","inboundUidValidity","inboundLastUid","inboundJunkUidValidity","inboundJunkLastUid","inboundSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Mailbox","description":"Mailbox details."}},"required":["mailbox"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putMailboxManagementMailboxesByUuid","summary":"Update mailbox","description":"Update a mailbox's sender name, signature, or folder. Domain, username and type are create-only (PUT /mailboxManagement/mailboxes/{uuid}).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Mailbox identifier."},"required":true,"description":"Mailbox identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"title":"First name","description":"Sender first name shown in the From header.","type":"string","minLength":1,"maxLength":64},"lastName":{"title":"Last name","description":"Sender last name shown in the From header.","type":"string","minLength":1,"maxLength":64},"signature":{"title":"Signature","description":"HTML signature stored on the mailbox. Null clears it. Not yet appended to outgoing messages.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"folderUuid":{"title":"Folder UUID","description":"Folder to move the mailbox into. Null means the root.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update mailbox","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this mailbox belongs to."},"domainUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Purchased sending domain this mailbox is on, if any."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this mailbox is filed under, if any."},"provider":{"type":"string","enum":["mailpool"],"description":"Mailbox provider that provisions this mailbox."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this mailbox."},"credentials":{"type":"object","properties":{"smtp":{"description":"SMTP credentials used to send mail, if this mailbox uses SMTP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false},"imap":{"description":"IMAP credentials used to read mail, if this mailbox uses IMAP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false}},"additionalProperties":false,"description":"Transport credentials used to send and receive mail."},"email":{"type":"string","description":"Email address of this mailbox."},"firstName":{"type":"string","description":"First name shown on outbound mail."},"lastName":{"type":"string","description":"Last name shown on outbound mail."},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML signature appended to outbound mail, if set."},"type":{"type":"string","enum":["google","outlook","shared","private"],"description":"Kind of mailbox (Google, Outlook, shared, or private)."},"transport":{"type":"string","enum":["smtp","graph"],"description":"Transport used to send mail from this mailbox."},"status":{"type":"string","enum":["pending","active","inactive"],"description":"Provisioning status of this mailbox."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error code, if the mailbox is in a failed state."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error message, if the mailbox is in a failed state."},"warmupStatus":{"type":"string","enum":["disabled","pending","active","paused","failed"],"description":"Warm-up-network status of this mailbox."},"warmupDailyTarget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":40},{"type":"null"}],"description":"Warm-up messages per day at full ramp, if warm-up is configured."},"warmupStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time warm-up started, if it has."},"dailySendLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":40},{"type":"null"}],"description":"Explicit daily outreach ceiling for this mailbox, if set."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this mailbox."},"chargedUntil":{"description":"Time through which this mailbox is billed.","type":"string"},"inboundUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the inbox, if inbound sync has run."},"inboundLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last inbox UID processed by inbound reply sync, if any."},"inboundJunkUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the junk folder, if inbound sync has run."},"inboundJunkLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last junk-folder UID processed by inbound reply sync, if any."},"inboundSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time inbound mail was last synced, if it has been."},"createdAt":{"description":"Time this mailbox was created.","type":"string"},"updatedAt":{"description":"Time this mailbox was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this mailbox was deleted, if it has been."}},"required":["uuid","workspaceUuid","domainUuid","folderUuid","provider","meta","credentials","email","firstName","lastName","signature","type","transport","status","errorCode","errorMessage","warmupStatus","warmupDailyTarget","warmupStartedAt","dailySendLimit","userUuid","chargedUntil","inboundUidValidity","inboundLastUid","inboundJunkUidValidity","inboundJunkLastUid","inboundSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Mailbox","description":"Updated mailbox."}},"required":["mailbox"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteMailboxManagementMailboxesByUuid","summary":"Delete mailbox","description":"Delete a mailbox at the provider and stop its warm-up (DELETE /mailboxManagement/mailboxes/{uuid}).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Mailbox identifier."},"required":true,"description":"Mailbox identifier."}],"responses":{"200":{"description":"Delete mailbox","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this mailbox belongs to."},"domainUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Purchased sending domain this mailbox is on, if any."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this mailbox is filed under, if any."},"provider":{"type":"string","enum":["mailpool"],"description":"Mailbox provider that provisions this mailbox."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this mailbox."},"credentials":{"type":"object","properties":{"smtp":{"description":"SMTP credentials used to send mail, if this mailbox uses SMTP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false},"imap":{"description":"IMAP credentials used to read mail, if this mailbox uses IMAP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false}},"additionalProperties":false,"description":"Transport credentials used to send and receive mail."},"email":{"type":"string","description":"Email address of this mailbox."},"firstName":{"type":"string","description":"First name shown on outbound mail."},"lastName":{"type":"string","description":"Last name shown on outbound mail."},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML signature appended to outbound mail, if set."},"type":{"type":"string","enum":["google","outlook","shared","private"],"description":"Kind of mailbox (Google, Outlook, shared, or private)."},"transport":{"type":"string","enum":["smtp","graph"],"description":"Transport used to send mail from this mailbox."},"status":{"type":"string","enum":["pending","active","inactive"],"description":"Provisioning status of this mailbox."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error code, if the mailbox is in a failed state."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error message, if the mailbox is in a failed state."},"warmupStatus":{"type":"string","enum":["disabled","pending","active","paused","failed"],"description":"Warm-up-network status of this mailbox."},"warmupDailyTarget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":40},{"type":"null"}],"description":"Warm-up messages per day at full ramp, if warm-up is configured."},"warmupStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time warm-up started, if it has."},"dailySendLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":40},{"type":"null"}],"description":"Explicit daily outreach ceiling for this mailbox, if set."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this mailbox."},"chargedUntil":{"description":"Time through which this mailbox is billed.","type":"string"},"inboundUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the inbox, if inbound sync has run."},"inboundLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last inbox UID processed by inbound reply sync, if any."},"inboundJunkUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the junk folder, if inbound sync has run."},"inboundJunkLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last junk-folder UID processed by inbound reply sync, if any."},"inboundSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time inbound mail was last synced, if it has been."},"createdAt":{"description":"Time this mailbox was created.","type":"string"},"updatedAt":{"description":"Time this mailbox was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this mailbox was deleted, if it has been."}},"required":["uuid","workspaceUuid","domainUuid","folderUuid","provider","meta","credentials","email","firstName","lastName","signature","type","transport","status","errorCode","errorMessage","warmupStatus","warmupDailyTarget","warmupStartedAt","dailySendLimit","userUuid","chargedUntil","inboundUidValidity","inboundLastUid","inboundJunkUidValidity","inboundJunkLastUid","inboundSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Mailbox","description":"Deleted mailbox."}},"required":["mailbox"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/mailboxes/{uuid}/refresh-status":{"post":{"operationId":"postMailboxManagementMailboxesByUuidRefreshStatus","summary":"Refresh mailbox status","description":"Re-poll the provider for a mailbox's status and warm-up (POST /mailboxManagement/mailboxes/{uuid}/refresh-status).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Mailbox identifier."},"required":true,"description":"Mailbox identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Refresh mailbox status","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this mailbox belongs to."},"domainUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Purchased sending domain this mailbox is on, if any."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this mailbox is filed under, if any."},"provider":{"type":"string","enum":["mailpool"],"description":"Mailbox provider that provisions this mailbox."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this mailbox."},"credentials":{"type":"object","properties":{"smtp":{"description":"SMTP credentials used to send mail, if this mailbox uses SMTP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false},"imap":{"description":"IMAP credentials used to read mail, if this mailbox uses IMAP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false}},"additionalProperties":false,"description":"Transport credentials used to send and receive mail."},"email":{"type":"string","description":"Email address of this mailbox."},"firstName":{"type":"string","description":"First name shown on outbound mail."},"lastName":{"type":"string","description":"Last name shown on outbound mail."},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML signature appended to outbound mail, if set."},"type":{"type":"string","enum":["google","outlook","shared","private"],"description":"Kind of mailbox (Google, Outlook, shared, or private)."},"transport":{"type":"string","enum":["smtp","graph"],"description":"Transport used to send mail from this mailbox."},"status":{"type":"string","enum":["pending","active","inactive"],"description":"Provisioning status of this mailbox."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error code, if the mailbox is in a failed state."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error message, if the mailbox is in a failed state."},"warmupStatus":{"type":"string","enum":["disabled","pending","active","paused","failed"],"description":"Warm-up-network status of this mailbox."},"warmupDailyTarget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":40},{"type":"null"}],"description":"Warm-up messages per day at full ramp, if warm-up is configured."},"warmupStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time warm-up started, if it has."},"dailySendLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":40},{"type":"null"}],"description":"Explicit daily outreach ceiling for this mailbox, if set."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this mailbox."},"chargedUntil":{"description":"Time through which this mailbox is billed.","type":"string"},"inboundUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the inbox, if inbound sync has run."},"inboundLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last inbox UID processed by inbound reply sync, if any."},"inboundJunkUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the junk folder, if inbound sync has run."},"inboundJunkLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last junk-folder UID processed by inbound reply sync, if any."},"inboundSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time inbound mail was last synced, if it has been."},"createdAt":{"description":"Time this mailbox was created.","type":"string"},"updatedAt":{"description":"Time this mailbox was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this mailbox was deleted, if it has been."}},"required":["uuid","workspaceUuid","domainUuid","folderUuid","provider","meta","credentials","email","firstName","lastName","signature","type","transport","status","errorCode","errorMessage","warmupStatus","warmupDailyTarget","warmupStartedAt","dailySendLimit","userUuid","chargedUntil","inboundUidValidity","inboundLastUid","inboundJunkUidValidity","inboundJunkLastUid","inboundSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Mailbox","description":"Mailbox after the provider status refresh."}},"required":["mailbox"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/mailboxes/{uuid}/warmup":{"get":{"operationId":"getMailboxManagementMailboxesByUuidWarmup","summary":"Get mailbox warm-up stats","description":"Get today's warm-up-network sent, inbox and spam counts for a mailbox (GET /mailboxManagement/mailboxes/{uuid}/warmup).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Mailbox identifier."},"required":true,"description":"Mailbox identifier."}],"responses":{"200":{"description":"Get mailbox warm-up stats","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"stats":{"anyOf":[{"type":"object","properties":{"sentCount":{"type":"number","title":"Sent count","description":"Warm-up-network emails sent today."},"deliveredCount":{"type":"number","title":"Delivered count","description":"Warm-up-network emails delivered today."},"spamCount":{"type":"number","title":"Spam count","description":"Warm-up-network emails that landed in spam today."},"inboxRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Inbox rate","description":"Delivered / sent as a 0-100 integer. Null when nothing has been sent."},"spamRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spam rate","description":"Landed in spam / sent as a 0-100 integer. Null when nothing has been sent."}},"required":["sentCount","deliveredCount","spamCount","inboxRate","spamRate"],"additionalProperties":false,"title":"Warm-up stats","description":"Today's warm-up-network traffic for the mailbox."},{"type":"null"}],"title":"Stats","description":"Today's warm-up-network traffic. Null while the inbox is still joining the pool."}},"required":["stats"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"operationId":"postMailboxManagementMailboxesByUuidWarmup","summary":"Start mailbox warm-up","description":"Start the provider warm-up pool for a mailbox (POST /mailboxManagement/mailboxes/{uuid}/warmup).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Mailbox identifier."},"required":true,"description":"Mailbox identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dailyTarget":{"title":"Daily target","description":"Warm-up messages per day at full ramp. Defaults to the outreach ceiling when omitted.","type":"integer","exclusiveMinimum":0,"maximum":40}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Start mailbox warm-up","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this mailbox belongs to."},"domainUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Purchased sending domain this mailbox is on, if any."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this mailbox is filed under, if any."},"provider":{"type":"string","enum":["mailpool"],"description":"Mailbox provider that provisions this mailbox."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this mailbox."},"credentials":{"type":"object","properties":{"smtp":{"description":"SMTP credentials used to send mail, if this mailbox uses SMTP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false},"imap":{"description":"IMAP credentials used to read mail, if this mailbox uses IMAP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false}},"additionalProperties":false,"description":"Transport credentials used to send and receive mail."},"email":{"type":"string","description":"Email address of this mailbox."},"firstName":{"type":"string","description":"First name shown on outbound mail."},"lastName":{"type":"string","description":"Last name shown on outbound mail."},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML signature appended to outbound mail, if set."},"type":{"type":"string","enum":["google","outlook","shared","private"],"description":"Kind of mailbox (Google, Outlook, shared, or private)."},"transport":{"type":"string","enum":["smtp","graph"],"description":"Transport used to send mail from this mailbox."},"status":{"type":"string","enum":["pending","active","inactive"],"description":"Provisioning status of this mailbox."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error code, if the mailbox is in a failed state."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error message, if the mailbox is in a failed state."},"warmupStatus":{"type":"string","enum":["disabled","pending","active","paused","failed"],"description":"Warm-up-network status of this mailbox."},"warmupDailyTarget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":40},{"type":"null"}],"description":"Warm-up messages per day at full ramp, if warm-up is configured."},"warmupStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time warm-up started, if it has."},"dailySendLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":40},{"type":"null"}],"description":"Explicit daily outreach ceiling for this mailbox, if set."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this mailbox."},"chargedUntil":{"description":"Time through which this mailbox is billed.","type":"string"},"inboundUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the inbox, if inbound sync has run."},"inboundLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last inbox UID processed by inbound reply sync, if any."},"inboundJunkUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the junk folder, if inbound sync has run."},"inboundJunkLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last junk-folder UID processed by inbound reply sync, if any."},"inboundSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time inbound mail was last synced, if it has been."},"createdAt":{"description":"Time this mailbox was created.","type":"string"},"updatedAt":{"description":"Time this mailbox was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this mailbox was deleted, if it has been."}},"required":["uuid","workspaceUuid","domainUuid","folderUuid","provider","meta","credentials","email","firstName","lastName","signature","type","transport","status","errorCode","errorMessage","warmupStatus","warmupDailyTarget","warmupStartedAt","dailySendLimit","userUuid","chargedUntil","inboundUidValidity","inboundLastUid","inboundJunkUidValidity","inboundJunkLastUid","inboundSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Mailbox","description":"Mailbox with warm-up running."}},"required":["mailbox"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"operationId":"patchMailboxManagementMailboxesByUuidWarmup","summary":"Update mailbox warm-up","description":"Change a mailbox's warm-up daily target or state (PATCH /mailboxManagement/mailboxes/{uuid}/warmup).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Mailbox identifier."},"required":true,"description":"Mailbox identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dailyTarget":{"title":"Daily target","description":"Warm-up messages per day at full ramp.","type":"integer","exclusiveMinimum":0,"maximum":40},"status":{"title":"Status","description":"Warm-up state to move to, e.g. `paused` to hold the pool without tearing it down.","type":"string","enum":["disabled","pending","active","paused","failed"]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update mailbox warm-up","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this mailbox belongs to."},"domainUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Purchased sending domain this mailbox is on, if any."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this mailbox is filed under, if any."},"provider":{"type":"string","enum":["mailpool"],"description":"Mailbox provider that provisions this mailbox."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this mailbox."},"credentials":{"type":"object","properties":{"smtp":{"description":"SMTP credentials used to send mail, if this mailbox uses SMTP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false},"imap":{"description":"IMAP credentials used to read mail, if this mailbox uses IMAP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false}},"additionalProperties":false,"description":"Transport credentials used to send and receive mail."},"email":{"type":"string","description":"Email address of this mailbox."},"firstName":{"type":"string","description":"First name shown on outbound mail."},"lastName":{"type":"string","description":"Last name shown on outbound mail."},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML signature appended to outbound mail, if set."},"type":{"type":"string","enum":["google","outlook","shared","private"],"description":"Kind of mailbox (Google, Outlook, shared, or private)."},"transport":{"type":"string","enum":["smtp","graph"],"description":"Transport used to send mail from this mailbox."},"status":{"type":"string","enum":["pending","active","inactive"],"description":"Provisioning status of this mailbox."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error code, if the mailbox is in a failed state."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error message, if the mailbox is in a failed state."},"warmupStatus":{"type":"string","enum":["disabled","pending","active","paused","failed"],"description":"Warm-up-network status of this mailbox."},"warmupDailyTarget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":40},{"type":"null"}],"description":"Warm-up messages per day at full ramp, if warm-up is configured."},"warmupStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time warm-up started, if it has."},"dailySendLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":40},{"type":"null"}],"description":"Explicit daily outreach ceiling for this mailbox, if set."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this mailbox."},"chargedUntil":{"description":"Time through which this mailbox is billed.","type":"string"},"inboundUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the inbox, if inbound sync has run."},"inboundLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last inbox UID processed by inbound reply sync, if any."},"inboundJunkUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the junk folder, if inbound sync has run."},"inboundJunkLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last junk-folder UID processed by inbound reply sync, if any."},"inboundSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time inbound mail was last synced, if it has been."},"createdAt":{"description":"Time this mailbox was created.","type":"string"},"updatedAt":{"description":"Time this mailbox was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this mailbox was deleted, if it has been."}},"required":["uuid","workspaceUuid","domainUuid","folderUuid","provider","meta","credentials","email","firstName","lastName","signature","type","transport","status","errorCode","errorMessage","warmupStatus","warmupDailyTarget","warmupStartedAt","dailySendLimit","userUuid","chargedUntil","inboundUidValidity","inboundLastUid","inboundJunkUidValidity","inboundJunkLastUid","inboundSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Mailbox","description":"Mailbox after the warm-up update."}},"required":["mailbox"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteMailboxManagementMailboxesByUuidWarmup","summary":"Stop mailbox warm-up","description":"Tear down a mailbox's warm-up pool. Resets the ramp, unlike pausing (DELETE /mailboxManagement/mailboxes/{uuid}/warmup).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Mailbox identifier."},"required":true,"description":"Mailbox identifier."}],"responses":{"200":{"description":"Stop mailbox warm-up","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"mailbox":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this mailbox belongs to."},"domainUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Purchased sending domain this mailbox is on, if any."},"folderUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Folder this mailbox is filed under, if any."},"provider":{"type":"string","enum":["mailpool"],"description":"Mailbox provider that provisions this mailbox."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this mailbox."},"credentials":{"type":"object","properties":{"smtp":{"description":"SMTP credentials used to send mail, if this mailbox uses SMTP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false},"imap":{"description":"IMAP credentials used to read mail, if this mailbox uses IMAP.","type":"object","properties":{"host":{"type":"string","description":"Hostname of the mail server."},"port":{"type":"number","description":"Port of the mail server."},"username":{"type":"string","description":"Username used to authenticate to the server."},"password":{"type":"object","properties":{"type":{"type":"string","enum":["encryption"]},"isEncrypted":{"type":"boolean"},"value":{"type":"string"}},"required":["type","isEncrypted","value"],"additionalProperties":false,"description":"Encrypted password used to authenticate to the server."},"isSecure":{"type":"boolean","description":"Whether the connection uses TLS."}},"required":["host","port","username","password","isSecure"],"additionalProperties":false}},"additionalProperties":false,"description":"Transport credentials used to send and receive mail."},"email":{"type":"string","description":"Email address of this mailbox."},"firstName":{"type":"string","description":"First name shown on outbound mail."},"lastName":{"type":"string","description":"Last name shown on outbound mail."},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML signature appended to outbound mail, if set."},"type":{"type":"string","enum":["google","outlook","shared","private"],"description":"Kind of mailbox (Google, Outlook, shared, or private)."},"transport":{"type":"string","enum":["smtp","graph"],"description":"Transport used to send mail from this mailbox."},"status":{"type":"string","enum":["pending","active","inactive"],"description":"Provisioning status of this mailbox."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error code, if the mailbox is in a failed state."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider error message, if the mailbox is in a failed state."},"warmupStatus":{"type":"string","enum":["disabled","pending","active","paused","failed"],"description":"Warm-up-network status of this mailbox."},"warmupDailyTarget":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":40},{"type":"null"}],"description":"Warm-up messages per day at full ramp, if warm-up is configured."},"warmupStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time warm-up started, if it has."},"dailySendLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":40},{"type":"null"}],"description":"Explicit daily outreach ceiling for this mailbox, if set."},"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User who created this mailbox."},"chargedUntil":{"description":"Time through which this mailbox is billed.","type":"string"},"inboundUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the inbox, if inbound sync has run."},"inboundLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last inbox UID processed by inbound reply sync, if any."},"inboundJunkUidValidity":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"IMAP UIDVALIDITY of the junk folder, if inbound sync has run."},"inboundJunkLastUid":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Last junk-folder UID processed by inbound reply sync, if any."},"inboundSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time inbound mail was last synced, if it has been."},"createdAt":{"description":"Time this mailbox was created.","type":"string"},"updatedAt":{"description":"Time this mailbox was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this mailbox was deleted, if it has been."}},"required":["uuid","workspaceUuid","domainUuid","folderUuid","provider","meta","credentials","email","firstName","lastName","signature","type","transport","status","errorCode","errorMessage","warmupStatus","warmupDailyTarget","warmupStartedAt","dailySendLimit","userUuid","chargedUntil","inboundUidValidity","inboundLastUid","inboundJunkUidValidity","inboundJunkLastUid","inboundSyncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Mailbox","description":"Mailbox with warm-up torn down."}},"required":["mailbox"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/mailboxes/{uuid}/send-allowance":{"get":{"operationId":"getMailboxManagementMailboxesByUuidSendAllowance","summary":"Get mailbox send allowance","description":"Get how many messages a mailbox may still send today (GET /mailboxManagement/mailboxes/{uuid}/send-allowance).","tags":["Mailbox Management - Mailboxes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Mailbox identifier."},"required":true,"description":"Mailbox identifier."}],"responses":{"200":{"description":"Get mailbox send allowance","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"allowance":{"type":"object","properties":{"dailyLimit":{"type":"number","title":"Daily limit","description":"Messages the mailbox may send today, derived from its warm-up ramp."},"sentCount":{"type":"number","title":"Sent count","description":"Messages sent in the last 24 hours."},"remainingCount":{"type":"number","title":"Remaining count","description":"Messages still available today."}},"required":["dailyLimit","sentCount","remainingCount"],"additionalProperties":false,"title":"Allowance","description":"Sending headroom left on the mailbox today."}},"required":["allowance"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/pricing":{"get":{"operationId":"getMailboxManagementPricing","summary":"Get mailbox pricing","description":"Get the monthly credit price of each mailbox type (GET /mailboxManagement/pricing).","tags":["Mailbox Management - Mailboxes"],"responses":{"200":{"description":"Get mailbox pricing","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"monthlyCredits":{"type":"object","propertyNames":{"type":"string","enum":["google","outlook","shared","private"]},"additionalProperties":{"type":"number"},"required":["google","outlook","shared","private"],"title":"Monthly credits","description":"Workspace credits charged per mailbox per month, keyed by mailbox type."}},"required":["monthlyCredits"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/messages":{"get":{"operationId":"getMailboxManagementMessages","summary":"List messages","description":"List sent-mail log rows (GET /mailboxManagement/messages).","tags":["Mailbox Management - Messages"],"parameters":[{"in":"query","name":"mailboxUuid","schema":{"title":"Mailbox UUID","description":"Only return messages sent from this mailbox.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Only return messages sent from this mailbox."},{"in":"query","name":"statuses","schema":{"title":"Statuses","description":"Match pending or error on the message, or the kind of its latest event. Selecting both groups ORs them.","type":"array","items":{"type":"string","enum":["pending","error","sent","opened","clicked","replied","bounced","unsubscribed"]}},"description":"Match pending or error on the message, or the kind of its latest event. Selecting both groups ORs them."},{"in":"query","name":"createdAfter","schema":{"title":"Created after","description":"Include messages created at or after this ISO timestamp.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Include messages created at or after this ISO timestamp."},{"in":"query","name":"createdBefore","schema":{"title":"Created before","description":"Include messages created at or before this ISO timestamp.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Include messages created at or before this ISO timestamp."},{"in":"query","name":"search","schema":{"title":"Search","description":"Case-insensitive match on recipient address or subject.","type":"string","minLength":1},"description":"Case-insensitive match on recipient address or subject."},{"in":"query","name":"threadUuid","schema":{"title":"Thread UUID","description":"Only return outbound sends in this conversation.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Only return outbound sends in this conversation."},{"in":"query","name":"limit","schema":{"default":50,"title":"Limit","description":"Maximum number of messages to return.","type":"integer","exclusiveMinimum":0,"maximum":200},"description":"Maximum number of messages to return."},{"in":"query","name":"offset","schema":{"default":0,"title":"Offset","description":"Number of messages to skip.","type":"integer","minimum":0,"maximum":9007199254740991},"description":"Number of messages to skip."}],"responses":{"200":{"description":"List messages","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Count","description":"Total number of messages matching the filters."},"messages":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this message belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent this message."},"toEmail":{"type":"string","description":"Recipient email address."},"subject":{"type":"string","description":"Message subject."},"bodyHtml":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML body of the message, if set."},"bodyText":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Plain-text body of the message, if set."},"rfcMessageId":{"type":"string","description":"RFC Message-ID of this message."},"inReplyTo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID this message replies to, if any."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread this message belongs to."},"providerMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider-assigned message identifier, if one exists."},"status":{"type":"string","enum":["pending","success","error"],"description":"Send status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message, if sending this message failed."},"sentAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was sent, if it has been."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"lastEvent":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Delivery event identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this event belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent the message this event is for."},"messageUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message this event is about."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread the message belongs to."},"kind":{"type":"string","enum":["sent","opened","clicked","replied","bounced","unsubscribed"],"description":"Kind of delivery event that was recorded."},"occurredAt":{"description":"Time this event occurred.","type":"string"},"actorEmail":{"type":"string","description":"Email address of the actor who caused this event."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Clicked URL, if this is a click event."},"inboundRfcMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID of the inbound reply, if this is a reply event."},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-agent reported with this event, if any."},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Short text snippet from a reply, if this is a reply event."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this event."},"createdAt":{"description":"Time this event was recorded.","type":"string"}},"required":["uuid","workspaceUuid","mailboxUuid","messageUuid","threadUuid","kind","occurredAt","actorEmail","url","inboundRfcMessageId","userAgent","snippet","meta","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent delivery event for this message, if any."}},"required":["uuid","workspaceUuid","mailboxUuid","toEmail","subject","bodyHtml","bodyText","rfcMessageId","inReplyTo","threadUuid","providerMessageId","status","errorMessage","sentAt","createdAt","updatedAt","lastEvent"],"additionalProperties":false},"title":"Messages","description":"Page of sent-mail log rows, newest first."}},"required":["count","messages"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/messages/{uuid}":{"get":{"operationId":"getMailboxManagementMessagesByUuid","summary":"Get message","description":"Get a sent message including HTML and text bodies (GET /mailboxManagement/messages/{uuid}).","tags":["Mailbox Management - Messages"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Message identifier."},"required":true,"description":"Message identifier."}],"responses":{"200":{"description":"Get message","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this message belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent this message."},"toEmail":{"type":"string","description":"Recipient email address."},"subject":{"type":"string","description":"Message subject."},"bodyHtml":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML body of the message, if set."},"bodyText":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Plain-text body of the message, if set."},"rfcMessageId":{"type":"string","description":"RFC Message-ID of this message."},"inReplyTo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID this message replies to, if any."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread this message belongs to."},"providerMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider-assigned message identifier, if one exists."},"status":{"type":"string","enum":["pending","success","error"],"description":"Send status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message, if sending this message failed."},"sentAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was sent, if it has been."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"lastEvent":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Delivery event identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this event belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent the message this event is for."},"messageUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message this event is about."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread the message belongs to."},"kind":{"type":"string","enum":["sent","opened","clicked","replied","bounced","unsubscribed"],"description":"Kind of delivery event that was recorded."},"occurredAt":{"description":"Time this event occurred.","type":"string"},"actorEmail":{"type":"string","description":"Email address of the actor who caused this event."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Clicked URL, if this is a click event."},"inboundRfcMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID of the inbound reply, if this is a reply event."},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-agent reported with this event, if any."},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Short text snippet from a reply, if this is a reply event."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this event."},"createdAt":{"description":"Time this event was recorded.","type":"string"}},"required":["uuid","workspaceUuid","mailboxUuid","messageUuid","threadUuid","kind","occurredAt","actorEmail","url","inboundRfcMessageId","userAgent","snippet","meta","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent delivery event for this message, if any."}},"required":["uuid","workspaceUuid","mailboxUuid","toEmail","subject","bodyHtml","bodyText","rfcMessageId","inReplyTo","threadUuid","providerMessageId","status","errorMessage","sentAt","createdAt","updatedAt","lastEvent"],"additionalProperties":false,"title":"Message","description":"Full message, including HTML and text bodies."}},"required":["message"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/threads":{"get":{"operationId":"getMailboxManagementThreads","summary":"List threads","description":"List conversations. Each row is a thread with lastEmail and lastEvent attached (GET /mailboxManagement/threads).","tags":["Mailbox Management - Threads"],"parameters":[{"in":"query","name":"mailboxUuid","schema":{"title":"Mailbox UUID","description":"Only return threads sent from this mailbox.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Only return threads sent from this mailbox."},{"in":"query","name":"statuses","schema":{"title":"Statuses","description":"Match pending or error on the latest email, or the kind of the thread's latest event. Selecting both groups ORs them.","type":"array","items":{"type":"string","enum":["pending","error","sent","opened","clicked","replied","bounced","unsubscribed"]}},"description":"Match pending or error on the latest email, or the kind of the thread's latest event. Selecting both groups ORs them."},{"in":"query","name":"createdAfter","schema":{"title":"Created after","description":"Include threads last updated at or after this ISO timestamp.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Include threads last updated at or after this ISO timestamp."},{"in":"query","name":"createdBefore","schema":{"title":"Created before","description":"Include threads last updated at or before this ISO timestamp.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Include threads last updated at or before this ISO timestamp."},{"in":"query","name":"search","schema":{"title":"Search","description":"Case-insensitive match on recipient address or subject.","type":"string","minLength":1},"description":"Case-insensitive match on recipient address or subject."},{"in":"query","name":"limit","schema":{"default":50,"title":"Limit","description":"Maximum number of threads to return.","type":"integer","exclusiveMinimum":0,"maximum":200},"description":"Maximum number of threads to return."},{"in":"query","name":"offset","schema":{"default":0,"title":"Offset","description":"Number of threads to skip.","type":"integer","minimum":0,"maximum":9007199254740991},"description":"Number of threads to skip."}],"responses":{"200":{"description":"List threads","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Count","description":"Total number of threads matching the filters."},"threads":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this thread belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox this thread was sent from."},"toEmail":{"type":"string","description":"Recipient email address of this thread."},"subject":{"type":"string","description":"Subject of this thread."},"createdAt":{"description":"Time this thread was created.","type":"string"},"updatedAt":{"description":"Time this thread was last updated.","type":"string"},"lastEmail":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this message belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent this message."},"toEmail":{"type":"string","description":"Recipient email address."},"subject":{"type":"string","description":"Message subject."},"bodyHtml":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML body of the message, if set."},"bodyText":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Plain-text body of the message, if set."},"rfcMessageId":{"type":"string","description":"RFC Message-ID of this message."},"inReplyTo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID this message replies to, if any."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread this message belongs to."},"providerMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider-assigned message identifier, if one exists."},"status":{"type":"string","enum":["pending","success","error"],"description":"Send status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message, if sending this message failed."},"sentAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was sent, if it has been."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"lastEvent":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Delivery event identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this event belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent the message this event is for."},"messageUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message this event is about."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread the message belongs to."},"kind":{"type":"string","enum":["sent","opened","clicked","replied","bounced","unsubscribed"],"description":"Kind of delivery event that was recorded."},"occurredAt":{"description":"Time this event occurred.","type":"string"},"actorEmail":{"type":"string","description":"Email address of the actor who caused this event."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Clicked URL, if this is a click event."},"inboundRfcMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID of the inbound reply, if this is a reply event."},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-agent reported with this event, if any."},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Short text snippet from a reply, if this is a reply event."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this event."},"createdAt":{"description":"Time this event was recorded.","type":"string"}},"required":["uuid","workspaceUuid","mailboxUuid","messageUuid","threadUuid","kind","occurredAt","actorEmail","url","inboundRfcMessageId","userAgent","snippet","meta","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent delivery event for this message, if any."}},"required":["uuid","workspaceUuid","mailboxUuid","toEmail","subject","bodyHtml","bodyText","rfcMessageId","inReplyTo","threadUuid","providerMessageId","status","errorMessage","sentAt","createdAt","updatedAt","lastEvent"],"additionalProperties":false},{"type":"null"}],"description":"Most recent message in this thread, if any."},"lastEvent":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Delivery event identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this event belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent the message this event is for."},"messageUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message this event is about."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread the message belongs to."},"kind":{"type":"string","enum":["sent","opened","clicked","replied","bounced","unsubscribed"],"description":"Kind of delivery event that was recorded."},"occurredAt":{"description":"Time this event occurred.","type":"string"},"actorEmail":{"type":"string","description":"Email address of the actor who caused this event."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Clicked URL, if this is a click event."},"inboundRfcMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID of the inbound reply, if this is a reply event."},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-agent reported with this event, if any."},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Short text snippet from a reply, if this is a reply event."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this event."},"createdAt":{"description":"Time this event was recorded.","type":"string"}},"required":["uuid","workspaceUuid","mailboxUuid","messageUuid","threadUuid","kind","occurredAt","actorEmail","url","inboundRfcMessageId","userAgent","snippet","meta","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent delivery event on this thread, if any."}},"required":["uuid","workspaceUuid","mailboxUuid","toEmail","subject","createdAt","updatedAt","lastEmail","lastEvent"],"additionalProperties":false},"title":"Threads","description":"Page of conversations, most recently active first."}},"required":["count","threads"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/threads/{uuid}":{"get":{"operationId":"getMailboxManagementThreadsByUuid","summary":"Get thread","description":"Get a conversation including lastEmail and lastEvent (GET /mailboxManagement/threads/{uuid}).","tags":["Mailbox Management - Threads"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Thread identifier."},"required":true,"description":"Thread identifier."}],"responses":{"200":{"description":"Get thread","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"thread":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this thread belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox this thread was sent from."},"toEmail":{"type":"string","description":"Recipient email address of this thread."},"subject":{"type":"string","description":"Subject of this thread."},"createdAt":{"description":"Time this thread was created.","type":"string"},"updatedAt":{"description":"Time this thread was last updated.","type":"string"},"lastEmail":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this message belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent this message."},"toEmail":{"type":"string","description":"Recipient email address."},"subject":{"type":"string","description":"Message subject."},"bodyHtml":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTML body of the message, if set."},"bodyText":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Plain-text body of the message, if set."},"rfcMessageId":{"type":"string","description":"RFC Message-ID of this message."},"inReplyTo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID this message replies to, if any."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread this message belongs to."},"providerMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider-assigned message identifier, if one exists."},"status":{"type":"string","enum":["pending","success","error"],"description":"Send status of this message."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message, if sending this message failed."},"sentAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this message was sent, if it has been."},"createdAt":{"description":"Time this message was created.","type":"string"},"updatedAt":{"description":"Time this message was last updated.","type":"string"},"lastEvent":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Delivery event identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this event belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent the message this event is for."},"messageUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message this event is about."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread the message belongs to."},"kind":{"type":"string","enum":["sent","opened","clicked","replied","bounced","unsubscribed"],"description":"Kind of delivery event that was recorded."},"occurredAt":{"description":"Time this event occurred.","type":"string"},"actorEmail":{"type":"string","description":"Email address of the actor who caused this event."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Clicked URL, if this is a click event."},"inboundRfcMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID of the inbound reply, if this is a reply event."},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-agent reported with this event, if any."},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Short text snippet from a reply, if this is a reply event."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this event."},"createdAt":{"description":"Time this event was recorded.","type":"string"}},"required":["uuid","workspaceUuid","mailboxUuid","messageUuid","threadUuid","kind","occurredAt","actorEmail","url","inboundRfcMessageId","userAgent","snippet","meta","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent delivery event for this message, if any."}},"required":["uuid","workspaceUuid","mailboxUuid","toEmail","subject","bodyHtml","bodyText","rfcMessageId","inReplyTo","threadUuid","providerMessageId","status","errorMessage","sentAt","createdAt","updatedAt","lastEvent"],"additionalProperties":false},{"type":"null"}],"description":"Most recent message in this thread, if any."},"lastEvent":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Delivery event identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this event belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent the message this event is for."},"messageUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message this event is about."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread the message belongs to."},"kind":{"type":"string","enum":["sent","opened","clicked","replied","bounced","unsubscribed"],"description":"Kind of delivery event that was recorded."},"occurredAt":{"description":"Time this event occurred.","type":"string"},"actorEmail":{"type":"string","description":"Email address of the actor who caused this event."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Clicked URL, if this is a click event."},"inboundRfcMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID of the inbound reply, if this is a reply event."},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-agent reported with this event, if any."},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Short text snippet from a reply, if this is a reply event."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this event."},"createdAt":{"description":"Time this event was recorded.","type":"string"}},"required":["uuid","workspaceUuid","mailboxUuid","messageUuid","threadUuid","kind","occurredAt","actorEmail","url","inboundRfcMessageId","userAgent","snippet","meta","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent delivery event on this thread, if any."}},"required":["uuid","workspaceUuid","mailboxUuid","toEmail","subject","createdAt","updatedAt","lastEmail","lastEvent"],"additionalProperties":false,"title":"Thread","description":"Conversation, including lastEmail and lastEvent."}},"required":["thread"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/events":{"get":{"operationId":"getMailboxManagementEvents","summary":"List events","description":"List sends, opens, clicks, replies, bounces and unsubscribes across the workspace (GET /mailboxManagement/events).","tags":["Mailbox Management - Events"],"parameters":[{"in":"query","name":"mailboxUuid","schema":{"title":"Mailbox UUID","description":"Only return events on messages sent from this mailbox.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Only return events on messages sent from this mailbox."},{"in":"query","name":"messageUuid","schema":{"title":"Message UUID","description":"Only return events on this message.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Only return events on this message."},{"in":"query","name":"threadUuid","schema":{"title":"Thread UUID","description":"Only return events in this conversation.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Only return events in this conversation."},{"in":"query","name":"kinds","schema":{"title":"Kinds","description":"Optional kind filter.","type":"array","items":{"type":"string","enum":["sent","opened","clicked","replied","bounced","unsubscribed"]}},"description":"Optional kind filter."},{"in":"query","name":"occurredAfter","schema":{"title":"Occurred after","description":"Include events that happened at or after this ISO timestamp.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Include events that happened at or after this ISO timestamp."},{"in":"query","name":"occurredBefore","schema":{"title":"Occurred before","description":"Include events that happened at or before this ISO timestamp.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Include events that happened at or before this ISO timestamp."},{"in":"query","name":"search","schema":{"title":"Search","description":"Case-insensitive match on actor address, reply snippet, recipient, or the outbound subject.","type":"string","minLength":1},"description":"Case-insensitive match on actor address, reply snippet, recipient, or the outbound subject."},{"in":"query","name":"limit","schema":{"default":50,"title":"Limit","description":"Maximum number of events to return.","type":"integer","exclusiveMinimum":0,"maximum":200},"description":"Maximum number of events to return."},{"in":"query","name":"offset","schema":{"default":0,"title":"Offset","description":"Number of events to skip.","type":"integer","minimum":0,"maximum":9007199254740991},"description":"Number of events to skip."}],"responses":{"200":{"description":"List events","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Count","description":"Total number of events matching the filters."},"events":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Delivery event identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this event belongs to."},"mailboxUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Mailbox that sent the message this event is for."},"messageUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Message this event is about."},"threadUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Thread the message belongs to."},"kind":{"type":"string","enum":["sent","opened","clicked","replied","bounced","unsubscribed"],"description":"Kind of delivery event that was recorded."},"occurredAt":{"description":"Time this event occurred.","type":"string"},"actorEmail":{"type":"string","description":"Email address of the actor who caused this event."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Clicked URL, if this is a click event."},"inboundRfcMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID of the inbound reply, if this is a reply event."},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-agent reported with this event, if any."},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Short text snippet from a reply, if this is a reply event."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider-specific metadata for this event."},"createdAt":{"description":"Time this event was recorded.","type":"string"}},"required":["uuid","workspaceUuid","mailboxUuid","messageUuid","threadUuid","kind","occurredAt","actorEmail","url","inboundRfcMessageId","userAgent","snippet","meta","createdAt"],"additionalProperties":false},"title":"Events","description":"Page of events, newest first."}},"required":["count","events"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/mailboxManagement/suppressions":{"get":{"operationId":"getMailboxManagementSuppressions","summary":"List suppressions","description":"List the addresses the workspace may no longer send to (GET /mailboxManagement/suppressions).","tags":["Mailbox Management - Suppressions"],"parameters":[{"in":"query","name":"reasons","schema":{"title":"Reasons","description":"Optional reason filter.","type":"array","items":{"type":"string","enum":["unsubscribed","bounced","complained","manual"]}},"description":"Optional reason filter."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of suppressions to return.","type":"integer","exclusiveMinimum":0,"maximum":1000},"description":"Maximum number of suppressions to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of suppressions to skip.","type":"integer","minimum":0,"maximum":9007199254740991},"description":"Number of suppressions to skip."}],"responses":{"200":{"description":"List suppressions","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"Count","description":"Total number of suppressions matching the filters."},"suppressions":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Suppression identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this suppression belongs to."},"email":{"type":"string","description":"Email address that must not be mailed."},"reason":{"type":"string","enum":["unsubscribed","bounced","complained","manual"],"description":"Why this address was suppressed."},"mailboxUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Mailbox that produced this suppression, if any."},"messageUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Message that produced this suppression, if any."},"createdAt":{"description":"Time this suppression was created.","type":"string"},"updatedAt":{"description":"Time this suppression was last updated.","type":"string"}},"required":["uuid","workspaceUuid","email","reason","mailboxUuid","messageUuid","createdAt","updatedAt"],"additionalProperties":false},"title":"Suppressions","description":"Addresses the workspace may no longer send to."}},"required":["count","suppressions"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"post":{"operationId":"postMailboxManagementSuppressions","summary":"Suppress an address","description":"Suppress an address by hand, for opt-outs that arrive by reply rather than through the unsubscribe link (POST /mailboxManagement/suppressions).","tags":["Mailbox Management - Suppressions"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","title":"Email","description":"Address that should stop receiving mail."}},"required":["email"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Suppress an address","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"suppression":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Suppression identifier."},"workspaceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Workspace this suppression belongs to."},"email":{"type":"string","description":"Email address that must not be mailed."},"reason":{"type":"string","enum":["unsubscribed","bounced","complained","manual"],"description":"Why this address was suppressed."},"mailboxUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Mailbox that produced this suppression, if any."},"messageUuid":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Message that produced this suppression, if any."},"createdAt":{"description":"Time this suppression was created.","type":"string"},"updatedAt":{"description":"Time this suppression was last updated.","type":"string"}},"required":["uuid","workspaceUuid","email","reason","mailboxUuid","messageUuid","createdAt","updatedAt"],"additionalProperties":false,"title":"Suppression","description":"The suppression covering this address. Returns the existing one when the address was already suppressed."}},"required":["suppression"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/actions/execute":{"post":{"operationId":"postOrchestrationActionsExecute","summary":"Execute action","description":"Execute an orchestration action. Without waitUntilFinished the response is 202 Accepted: poll Location until the run reaches a terminal status. Set waitUntilFinished to block until the run completes (up to 5 minutes); a finished run is 200. (POST /orchestration/actions/execute).","tags":["Orchestration - Actions"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"allOf":[{"type":"object","properties":{"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."},"retry":{"description":"Retry policy for this action, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}}},"required":["config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Action is a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Action calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Action invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Action invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Action calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}],"title":"Action","description":"Action to execute."},"data":{"title":"Data","description":"Input data for the run."},"waitUntilFinished":{"title":"Wait until finished","description":"When true, the request blocks until the run reaches a terminal status, up to 5 minutes. On timeout the run keeps running and the response is 408.","type":"boolean"},"webhookUrl":{"title":"Webhook URL","description":"URL to call when the run completes.","type":"string","format":"uri"},"webhookSecret":{"title":"Webhook secret","description":"Secret used to sign webhook deliveries. When provided, Cargo includes an X-Cargo-Signature header (sha256=<hex-hmac>) so you can verify the payload.","type":"string"}},"required":["action"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Run finished within the wait window. Returned only when waitUntilFinished is true.","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"uuid":{"type":"string","description":"Run identifier."},"workspaceUuid":{"type":"string","description":"Workspace this run belongs to."},"workflowUuid":{"type":"string","description":"Workflow this run executed."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this run, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this run executed, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this run started."},"batchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch this run belongs to, if any."},"traceUuid":{"type":"string","description":"Trace that records this run."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow executing this run."},"recordId":{"type":"string","description":"Record this run is processing."},"recordTitle":{"type":"string","description":"Display title of the record."},"contextS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for the run context, if stored."},"computedConfigsS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for computed node configs, if stored."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent run, if this run was nested."},"parentNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent node that started this run, if any."},"parentBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent batch that started this run, if any."},"parentAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent agent that started this run, if any."},"parentChatUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent chat that started this run, if any."},"parentMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent message that started this run, if any."},"isGroupParent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this run is the parent of a group, if known."},"status":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"],"description":"Current status of this run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this run failed."},"executions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"nodeUuid":{"type":"string","description":"Node this execution belongs to."},"nodeSlug":{"type":"string","description":"Slug of the executed node."},"nodeBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch started by this node, if any."},"nodeRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run started by this node, if any."},"nodeMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message started by this node, if any."},"nodeChildIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index of the child that was taken, if any."},"nextNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Next node to execute, if any."},"status":{"type":"string","enum":["pending","success","error"],"description":"Current status of this execution."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this execution failed."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display title for this execution, if set."},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Icon shown for this execution, if any."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this execution."},"nodeWaitUntilFinished":{"type":"boolean","description":"Whether the parent waited for this node to finish."}},"required":["nodeUuid","nodeSlug","nodeBatchUuid","nodeRunUuid","nodeMessageUuid","nodeChildIndex","nextNodeUuid","status","errorMessage","title","iconUrl","creditsUsedCount","nodeWaitUntilFinished"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution ran a native action.","enum":["native"]},"nodeActionSlug":{"type":"string","description":"Native action that ran."}},"required":["nodeKind","nodeActionSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a connector.","enum":["connector"]},"nodeActionSlug":{"type":"string","description":"Connector action that ran."},"nodeConnectorUuid":{"type":"string","description":"Connector this execution called."},"nodeIntegrationSlug":{"type":"string","description":"Integration this execution used."},"nodeWorkerUuid":{"description":"Worker this execution called, if any.","type":"string"}},"required":["nodeKind","nodeActionSlug","nodeConnectorUuid","nodeIntegrationSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked a tool.","enum":["tool"]},"nodeToolUuid":{"type":"string","description":"Tool this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool release this execution ran, if pinned."}},"required":["nodeKind","nodeToolUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked an agent.","enum":["agent"]},"nodeAgentUuid":{"type":"string","description":"Agent this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent release this execution ran, if pinned."}},"required":["nodeKind","nodeAgentUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a worker.","enum":["worker"]},"nodeWorkerUuid":{"type":"string","description":"Worker this execution called."}},"required":["nodeKind","nodeWorkerUuid"],"additionalProperties":false}]}]},"description":"Node executions in this run."},"createdAt":{"description":"Time this run was created.","type":"string"},"updatedAt":{"description":"Time this run was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run was deleted, if it has been."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","releaseUuid","nodes","batchUuid","traceUuid","temporalWorkflowId","recordId","recordTitle","contextS3Filename","computedConfigsS3Filename","parentUuid","parentNodeUuid","parentBatchUuid","parentAgentUuid","parentChatUuid","parentMessageUuid","isGroupParent","status","errorMessage","executions","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false,"title":"Run","description":"Created run details."},"runComputedConfigs":{"title":"Run computed configs","description":"Computed configuration values for the run. Present when waitUntilFinished is true.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"runContext":{"title":"Run context","description":"Context values captured for the run. Present when waitUntilFinished is true.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["run"],"additionalProperties":false}}}},"202":{"description":"Run accepted. Poll the Location header until the run reaches a terminal status.","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}},"Location":{"description":"Path of the status resource to poll until the job reaches a terminal status.","schema":{"type":"string","example":"/v1/orchestration/runs/550e8400-e29b-41d4-a716-446655440000"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"uuid":{"type":"string","description":"Run identifier."},"workspaceUuid":{"type":"string","description":"Workspace this run belongs to."},"workflowUuid":{"type":"string","description":"Workflow this run executed."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this run, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this run executed, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this run started."},"batchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch this run belongs to, if any."},"traceUuid":{"type":"string","description":"Trace that records this run."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow executing this run."},"recordId":{"type":"string","description":"Record this run is processing."},"recordTitle":{"type":"string","description":"Display title of the record."},"contextS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for the run context, if stored."},"computedConfigsS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for computed node configs, if stored."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent run, if this run was nested."},"parentNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent node that started this run, if any."},"parentBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent batch that started this run, if any."},"parentAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent agent that started this run, if any."},"parentChatUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent chat that started this run, if any."},"parentMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent message that started this run, if any."},"isGroupParent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this run is the parent of a group, if known."},"status":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"],"description":"Current status of this run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this run failed."},"executions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"nodeUuid":{"type":"string","description":"Node this execution belongs to."},"nodeSlug":{"type":"string","description":"Slug of the executed node."},"nodeBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch started by this node, if any."},"nodeRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run started by this node, if any."},"nodeMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message started by this node, if any."},"nodeChildIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index of the child that was taken, if any."},"nextNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Next node to execute, if any."},"status":{"type":"string","enum":["pending","success","error"],"description":"Current status of this execution."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this execution failed."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display title for this execution, if set."},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Icon shown for this execution, if any."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this execution."},"nodeWaitUntilFinished":{"type":"boolean","description":"Whether the parent waited for this node to finish."}},"required":["nodeUuid","nodeSlug","nodeBatchUuid","nodeRunUuid","nodeMessageUuid","nodeChildIndex","nextNodeUuid","status","errorMessage","title","iconUrl","creditsUsedCount","nodeWaitUntilFinished"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution ran a native action.","enum":["native"]},"nodeActionSlug":{"type":"string","description":"Native action that ran."}},"required":["nodeKind","nodeActionSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a connector.","enum":["connector"]},"nodeActionSlug":{"type":"string","description":"Connector action that ran."},"nodeConnectorUuid":{"type":"string","description":"Connector this execution called."},"nodeIntegrationSlug":{"type":"string","description":"Integration this execution used."},"nodeWorkerUuid":{"description":"Worker this execution called, if any.","type":"string"}},"required":["nodeKind","nodeActionSlug","nodeConnectorUuid","nodeIntegrationSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked a tool.","enum":["tool"]},"nodeToolUuid":{"type":"string","description":"Tool this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool release this execution ran, if pinned."}},"required":["nodeKind","nodeToolUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked an agent.","enum":["agent"]},"nodeAgentUuid":{"type":"string","description":"Agent this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent release this execution ran, if pinned."}},"required":["nodeKind","nodeAgentUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a worker.","enum":["worker"]},"nodeWorkerUuid":{"type":"string","description":"Worker this execution called."}},"required":["nodeKind","nodeWorkerUuid"],"additionalProperties":false}]}]},"description":"Node executions in this run."},"createdAt":{"description":"Time this run was created.","type":"string"},"updatedAt":{"description":"Time this run was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run was deleted, if it has been."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","releaseUuid","nodes","batchUuid","traceUuid","temporalWorkflowId","recordId","recordTitle","contextS3Filename","computedConfigsS3Filename","parentUuid","parentNodeUuid","parentBatchUuid","parentAgentUuid","parentChatUuid","parentMessageUuid","isGroupParent","status","errorMessage","executions","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false,"title":"Run","description":"Created run details."},"runComputedConfigs":{"title":"Run computed configs","description":"Computed configuration values for the run. Present when waitUntilFinished is true.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"runContext":{"title":"Run context","description":"Context values captured for the run. Present when waitUntilFinished is true.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["run"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/actions/execute-batch":{"post":{"operationId":"postOrchestrationActionsExecuteBatch","summary":"Execute action batch","description":"Execute an orchestration action as a batch. Without waitUntilFinished the response is 202 Accepted: poll Location until the batch reaches a terminal status. Set waitUntilFinished to block until the batch completes (up to 5 minutes); a finished batch is 200. (POST /orchestration/actions/execute-batch).","tags":["Orchestration - Actions"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"allOf":[{"type":"object","properties":{"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."},"retry":{"description":"Retry policy for this action, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}}},"required":["config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Action is a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Action calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Action invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Action invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Action calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}],"title":"Action","description":"Action to execute."},"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Records to process."},"webhookUrl":{"title":"Webhook URL","description":"URL to call when the batch completes.","type":"string","format":"uri"},"webhookSecret":{"title":"Webhook secret","description":"Secret used to sign webhook deliveries. When provided, Cargo includes an X-Cargo-Signature header (sha256=<hex-hmac>) so you can verify the payload.","type":"string"},"waitUntilFinished":{"title":"Wait until finished","description":"When true, the request blocks until the batch reaches a terminal status, up to 5 minutes. On timeout the batch keeps running and the response is 408.","type":"boolean"}},"required":["action","records"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Batch finished within the wait window. Returned only when waitUntilFinished is true.","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"batch":{"type":"object","properties":{"uuid":{"type":"string","description":"Batch identifier."},"workspaceUuid":{"type":"string","description":"Workspace this batch belongs to."},"workflowUuid":{"type":"string","description":"Workflow this batch executed."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this batch, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this batch executed, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this batch started."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow executing this batch."},"traceUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trace that records this batch, if any."},"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose records are processed."}},"required":["kind","segmentUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a model change.","enum":["change"]},"changeUuid":{"type":"string","description":"Change that produced this batch."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"segmentUuid":{"type":"string","description":"Segment whose records are processed."}},"required":["kind","changeUuid","changeKinds","segmentUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a filtered model query.","enum":["filter"]},"modelUuid":{"type":"string","description":"Model to query records from."},"filter":{"description":"Filter applied to the model, if any."},"sort":{"description":"Sort applied to the model, if any."},"limit":{"description":"Maximum number of records to include, if set.","type":"number"}},"required":["kind","modelUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from an explicit list of record identifiers.","enum":["recordIds"]},"modelUuid":{"type":"string","description":"Model these records belong to."},"ids":{"type":"array","items":{"type":"string"},"description":"Record identifiers to process."}},"required":["kind","modelUuid","ids"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from watched record changes.","enum":["watchedRecords"]},"modelUuid":{"type":"string","description":"Model being watched."},"filter":{"description":"Filter applied to watched records, if any."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"s3Filename":{"type":"string","description":"S3 key for the watched-record payload."},"meta":{"description":"Additional metadata for this watch batch, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","modelUuid","changeKinds","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from uploaded records.","enum":["records"]},"s3Filename":{"type":"string","description":"S3 key for the uploaded records."}},"required":["kind","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from an uploaded file.","enum":["file"]},"s3Filename":{"type":"string","description":"S3 key for the uploaded file."},"mappings":{"description":"Column mappings from the file to model fields, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from existing runs.","enum":["runs"]},"filter":{"description":"Filter that selects which runs to include."},"reset":{"description":"Reset instructions applied to the selected runs."}},"required":["kind","filter","reset"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch groups child runs under a parent.","enum":["group"]},"s3Filename":{"type":"string","description":"S3 key for the grouped-run payload."},"parentBatchUuid":{"description":"Parent batch this group belongs to, if any.","type":"string"},"parentRunUuid":{"type":"string","description":"Parent run this group belongs to."},"parentNodeUuid":{"type":"string","description":"Parent node that created this group."}},"required":["kind","s3Filename","parentRunUuid","parentNodeUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a scheduled play.","enum":["schedule"]},"modelUuid":{"type":"string","description":"Model this schedule watches."},"segmentUuid":{"type":"string","description":"Segment whose records are processed."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"changeUuid":{"description":"Change that produced this scheduled batch, if any.","type":"string"},"skip":{"description":"Whether this scheduled tick was skipped.","type":"boolean"},"totalRecordsCount":{"description":"Total records considered by this tick, if known.","type":"number"},"updatedRecordsCount":{"description":"Records updated since the last tick, if known.","type":"number"},"removedRecordsCount":{"description":"Records removed since the last tick, if known.","type":"number"},"addedRecordsCount":{"description":"Records added since the last tick, if known.","type":"number"},"unchangedRecordsCount":{"description":"Records unchanged since the last tick, if known.","type":"number"}},"required":["kind","modelUuid","segmentUuid","changeKinds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a public form.","enum":["form"]},"s3Filename":{"type":"string","description":"S3 key for the submitted form data."},"webhookUrl":{"description":"Webhook to notify when the batch finishes, if set.","type":"string"},"parentRunUuid":{"description":"Parent run that created this form batch, if any.","type":"string"},"parentNodeUuid":{"description":"Parent node that created this form batch, if any.","type":"string"},"parentBatchUuid":{"description":"Parent batch that created this form batch, if any.","type":"string"},"parentAgentUuid":{"description":"Parent agent that created this form batch, if any.","type":"string"},"parentChatUuid":{"description":"Parent chat that created this form batch, if any.","type":"string"},"parentMessageUuid":{"description":"Parent message that created this form batch, if any.","type":"string"}},"required":["kind","s3Filename"],"additionalProperties":false}],"description":"Source of the records in this batch."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this batch failed."},"status":{"type":"string","enum":["pending","syncing","skipped","querying","running","success","error","cancelling","cancelled"],"description":"Current status of this batch."},"runsStatus":{"anyOf":[{"type":"string","enum":["healthy","unhealthy"]},{"type":"null"}],"description":"Whether the runs in this batch are healthy, if known."},"runsCount":{"type":"number","description":"Total number of runs in this batch."},"executedRunsCount":{"type":"number","description":"Runs that have finished executing."},"failedRunsCount":{"type":"number","description":"Runs that failed."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this batch."},"createdAt":{"description":"Time this batch was created.","type":"string"},"updatedAt":{"description":"Time this batch was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this batch finished, if it has."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","releaseUuid","nodes","temporalWorkflowId","traceUuid","data","errorMessage","status","runsStatus","runsCount","executedRunsCount","failedRunsCount","creditsUsedCount","createdAt","updatedAt","finishedAt"],"additionalProperties":false,"title":"Batch","description":"Created batch details."}},"required":["batch"],"additionalProperties":false}}}},"202":{"description":"Batch accepted. Poll the Location header until the batch reaches a terminal status.","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}},"Location":{"description":"Path of the status resource to poll until the job reaches a terminal status.","schema":{"type":"string","example":"/v1/orchestration/batches/550e8400-e29b-41d4-a716-446655440000"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"batch":{"type":"object","properties":{"uuid":{"type":"string","description":"Batch identifier."},"workspaceUuid":{"type":"string","description":"Workspace this batch belongs to."},"workflowUuid":{"type":"string","description":"Workflow this batch executed."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this batch, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this batch executed, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this batch started."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow executing this batch."},"traceUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trace that records this batch, if any."},"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose records are processed."}},"required":["kind","segmentUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a model change.","enum":["change"]},"changeUuid":{"type":"string","description":"Change that produced this batch."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"segmentUuid":{"type":"string","description":"Segment whose records are processed."}},"required":["kind","changeUuid","changeKinds","segmentUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a filtered model query.","enum":["filter"]},"modelUuid":{"type":"string","description":"Model to query records from."},"filter":{"description":"Filter applied to the model, if any."},"sort":{"description":"Sort applied to the model, if any."},"limit":{"description":"Maximum number of records to include, if set.","type":"number"}},"required":["kind","modelUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from an explicit list of record identifiers.","enum":["recordIds"]},"modelUuid":{"type":"string","description":"Model these records belong to."},"ids":{"type":"array","items":{"type":"string"},"description":"Record identifiers to process."}},"required":["kind","modelUuid","ids"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from watched record changes.","enum":["watchedRecords"]},"modelUuid":{"type":"string","description":"Model being watched."},"filter":{"description":"Filter applied to watched records, if any."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"s3Filename":{"type":"string","description":"S3 key for the watched-record payload."},"meta":{"description":"Additional metadata for this watch batch, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","modelUuid","changeKinds","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from uploaded records.","enum":["records"]},"s3Filename":{"type":"string","description":"S3 key for the uploaded records."}},"required":["kind","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from an uploaded file.","enum":["file"]},"s3Filename":{"type":"string","description":"S3 key for the uploaded file."},"mappings":{"description":"Column mappings from the file to model fields, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from existing runs.","enum":["runs"]},"filter":{"description":"Filter that selects which runs to include."},"reset":{"description":"Reset instructions applied to the selected runs."}},"required":["kind","filter","reset"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch groups child runs under a parent.","enum":["group"]},"s3Filename":{"type":"string","description":"S3 key for the grouped-run payload."},"parentBatchUuid":{"description":"Parent batch this group belongs to, if any.","type":"string"},"parentRunUuid":{"type":"string","description":"Parent run this group belongs to."},"parentNodeUuid":{"type":"string","description":"Parent node that created this group."}},"required":["kind","s3Filename","parentRunUuid","parentNodeUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a scheduled play.","enum":["schedule"]},"modelUuid":{"type":"string","description":"Model this schedule watches."},"segmentUuid":{"type":"string","description":"Segment whose records are processed."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"changeUuid":{"description":"Change that produced this scheduled batch, if any.","type":"string"},"skip":{"description":"Whether this scheduled tick was skipped.","type":"boolean"},"totalRecordsCount":{"description":"Total records considered by this tick, if known.","type":"number"},"updatedRecordsCount":{"description":"Records updated since the last tick, if known.","type":"number"},"removedRecordsCount":{"description":"Records removed since the last tick, if known.","type":"number"},"addedRecordsCount":{"description":"Records added since the last tick, if known.","type":"number"},"unchangedRecordsCount":{"description":"Records unchanged since the last tick, if known.","type":"number"}},"required":["kind","modelUuid","segmentUuid","changeKinds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a public form.","enum":["form"]},"s3Filename":{"type":"string","description":"S3 key for the submitted form data."},"webhookUrl":{"description":"Webhook to notify when the batch finishes, if set.","type":"string"},"parentRunUuid":{"description":"Parent run that created this form batch, if any.","type":"string"},"parentNodeUuid":{"description":"Parent node that created this form batch, if any.","type":"string"},"parentBatchUuid":{"description":"Parent batch that created this form batch, if any.","type":"string"},"parentAgentUuid":{"description":"Parent agent that created this form batch, if any.","type":"string"},"parentChatUuid":{"description":"Parent chat that created this form batch, if any.","type":"string"},"parentMessageUuid":{"description":"Parent message that created this form batch, if any.","type":"string"}},"required":["kind","s3Filename"],"additionalProperties":false}],"description":"Source of the records in this batch."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this batch failed."},"status":{"type":"string","enum":["pending","syncing","skipped","querying","running","success","error","cancelling","cancelled"],"description":"Current status of this batch."},"runsStatus":{"anyOf":[{"type":"string","enum":["healthy","unhealthy"]},{"type":"null"}],"description":"Whether the runs in this batch are healthy, if known."},"runsCount":{"type":"number","description":"Total number of runs in this batch."},"executedRunsCount":{"type":"number","description":"Runs that have finished executing."},"failedRunsCount":{"type":"number","description":"Runs that failed."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this batch."},"createdAt":{"description":"Time this batch was created.","type":"string"},"updatedAt":{"description":"Time this batch was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this batch finished, if it has."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","releaseUuid","nodes","temporalWorkflowId","traceUuid","data","errorMessage","status","runsStatus","runsCount","executedRunsCount","failedRunsCount","creditsUsedCount","createdAt","updatedAt","finishedAt"],"additionalProperties":false,"title":"Batch","description":"Created batch details."}},"required":["batch"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/actions/get-output-schema":{"post":{"operationId":"postOrchestrationActionsGetOutputSchema","summary":"Get action output schema","description":"Get the output schema of an orchestration action (POST /orchestration/actions/get-output-schema).","tags":["Orchestration - Actions"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"allOf":[{"type":"object","properties":{"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."},"retry":{"description":"Retry policy for this action, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}}},"required":["config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Action is a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Action calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Action invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Action invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Action calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}],"title":"Action","description":"Action whose output schema to resolve."}},"required":["action"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Get action output schema","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Output schema","description":"JSON schema of the action's data output."}},"required":["schema"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/batches":{"post":{"operationId":"postOrchestrationBatches","summary":"Create batch","description":"Create a new orchestration batch. Returns 202 Accepted; poll Location until the batch reaches a terminal status. (POST /orchestration/batches).","tags":["Orchestration - Batches"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"title":"Workflow UUID","description":"Workflow identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"releaseUuid":{"title":"Release UUID","description":"Release identifier to run.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodes":{"title":"Nodes","description":"Custom nodes to use for the batch.","type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}]}},"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["segment"],"title":"Kind","description":"Data kind."},"segmentUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Segment UUID","description":"Segment identifier."}},"required":["kind","segmentUuid"]},{"type":"object","properties":{"kind":{"type":"string","enum":["change"],"title":"Kind","description":"Data kind."},"changeUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Change UUID","description":"Change identifier."},"changeKinds":{"type":"array","items":{"type":"string","enum":["added","updated","removed","unchanged"]},"title":"Change kinds","description":"Change kinds to include."}},"required":["kind","changeUuid","changeKinds"]},{"type":"object","properties":{"kind":{"type":"string","enum":["filter"],"title":"Kind","description":"Data kind."},"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"filter":{"title":"Filter","description":"Filter criteria.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},"sort":{"title":"Sort","description":"Sort criteria.","type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"]}},"limit":{"title":"Limit","description":"Maximum number of records.","type":"number"}},"required":["kind","modelUuid"]},{"type":"object","properties":{"kind":{"type":"string","enum":["file"],"title":"Kind","description":"Data kind."},"s3Filename":{"type":"string","title":"S3 filename","description":"S3 file identifier."},"mappings":{"title":"Mappings","description":"Field mappings for file data.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","s3Filename"]},{"type":"object","properties":{"kind":{"type":"string","enum":["runs"],"title":"Kind","description":"Data kind."},"filter":{"allOf":[{"type":"object","properties":{"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentRunUuid":{"title":"Parent run UUID","description":"Parent run identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether the run is a group parent.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Executions filter criteria.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include runs created after this timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include runs created before this timestamp.","type":"string"}}},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Filter kind.","enum":["runs"]},"uuids":{"title":"UUIDs","description":"Run identifiers to include.","type":"array","items":{"type":"string"}},"recordTitle":{"title":"Record title","description":"Record title to filter by.","type":"string"},"statuses":{"title":"Statuses","description":"Run statuses to include.","type":"array","items":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"]}}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Filter kind.","enum":["records"]},"ids":{"title":"IDs","description":"Record identifiers to include.","type":"array","items":{"type":"string"}},"title":{"title":"Title","description":"Record title to filter by.","type":"string"},"statuses":{"title":"Statuses","description":"Record statuses to include.","type":"array","items":{"type":"string","enum":["pending","running","success","error","cancelling","cancelled"]}}},"required":["kind"]}]}],"title":"Filter","description":"Runs filter criteria."},"reset":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","title":"From","description":"Reset from the last node.","enum":["lastNode"]}},"required":["from"]},{"type":"object","properties":{"from":{"type":"string","title":"From","description":"Reset from the first node.","enum":["firstNode"]}},"required":["from"]},{"type":"object","properties":{"from":{"type":"string","title":"From","description":"Reset from the next node.","enum":["nextNode"]}},"required":["from"]},{"type":"object","properties":{"from":{"type":"string","title":"From","description":"Reset from a specific node.","enum":["node"]},"nodeUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Node UUID","description":"Node identifier to reset from."}},"required":["from","nodeUuid"]}],"title":"Reset","description":"Reset options."}},"required":["kind","filter","reset"]},{"type":"object","properties":{"kind":{"type":"string","enum":["recordIds"],"title":"Kind","description":"Data kind."},"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"ids":{"type":"array","items":{"type":"string"},"title":"IDs","description":"Record identifiers."}},"required":["kind","modelUuid","ids"]},{"type":"object","properties":{"kind":{"type":"string","enum":["records"],"title":"Kind","description":"Data kind."},"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Inline records."}},"required":["kind","records"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"],"title":"Kind","description":"Data kind."},"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"segmentUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Segment UUID","description":"Segment identifier."},"changeKinds":{"type":"array","items":{"type":"string","enum":["added","updated","removed","unchanged"]},"title":"Change kinds","description":"Change kinds to include."},"skip":{"title":"Skip","description":"Whether to skip scheduling.","type":"boolean"}},"required":["kind","modelUuid","segmentUuid","changeKinds"]},{"type":"object","properties":{"kind":{"type":"string","enum":["form"],"title":"Kind","description":"Data kind."},"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Form records."},"webhookUrl":{"title":"Webhook URL","description":"URL to call when the batch completes.","type":"string","format":"uri"},"webhookSecret":{"title":"Webhook secret","description":"Secret used to sign webhook deliveries. When provided, Cargo includes an X-Cargo-Signature header (sha256=<hex-hmac>) so you can verify the payload.","type":"string"},"parentRunUuid":{"title":"Parent run UUID","description":"Parent run identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["kind","records"]}],"title":"Data","description":"Batch input data."}},"required":["data"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"202":{"description":"Batch accepted. Poll the Location header until the batch reaches a terminal status.","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}},"Location":{"description":"Path of the status resource to poll until the job reaches a terminal status.","schema":{"type":"string","example":"/v1/orchestration/batches/550e8400-e29b-41d4-a716-446655440000"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"batch":{"type":"object","properties":{"uuid":{"type":"string","description":"Batch identifier."},"workspaceUuid":{"type":"string","description":"Workspace this batch belongs to."},"workflowUuid":{"type":"string","description":"Workflow this batch executed."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this batch, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this batch executed, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this batch started."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow executing this batch."},"traceUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trace that records this batch, if any."},"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose records are processed."}},"required":["kind","segmentUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a model change.","enum":["change"]},"changeUuid":{"type":"string","description":"Change that produced this batch."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"segmentUuid":{"type":"string","description":"Segment whose records are processed."}},"required":["kind","changeUuid","changeKinds","segmentUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a filtered model query.","enum":["filter"]},"modelUuid":{"type":"string","description":"Model to query records from."},"filter":{"description":"Filter applied to the model, if any."},"sort":{"description":"Sort applied to the model, if any."},"limit":{"description":"Maximum number of records to include, if set.","type":"number"}},"required":["kind","modelUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from an explicit list of record identifiers.","enum":["recordIds"]},"modelUuid":{"type":"string","description":"Model these records belong to."},"ids":{"type":"array","items":{"type":"string"},"description":"Record identifiers to process."}},"required":["kind","modelUuid","ids"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from watched record changes.","enum":["watchedRecords"]},"modelUuid":{"type":"string","description":"Model being watched."},"filter":{"description":"Filter applied to watched records, if any."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"s3Filename":{"type":"string","description":"S3 key for the watched-record payload."},"meta":{"description":"Additional metadata for this watch batch, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","modelUuid","changeKinds","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from uploaded records.","enum":["records"]},"s3Filename":{"type":"string","description":"S3 key for the uploaded records."}},"required":["kind","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from an uploaded file.","enum":["file"]},"s3Filename":{"type":"string","description":"S3 key for the uploaded file."},"mappings":{"description":"Column mappings from the file to model fields, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from existing runs.","enum":["runs"]},"filter":{"description":"Filter that selects which runs to include."},"reset":{"description":"Reset instructions applied to the selected runs."}},"required":["kind","filter","reset"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch groups child runs under a parent.","enum":["group"]},"s3Filename":{"type":"string","description":"S3 key for the grouped-run payload."},"parentBatchUuid":{"description":"Parent batch this group belongs to, if any.","type":"string"},"parentRunUuid":{"type":"string","description":"Parent run this group belongs to."},"parentNodeUuid":{"type":"string","description":"Parent node that created this group."}},"required":["kind","s3Filename","parentRunUuid","parentNodeUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a scheduled play.","enum":["schedule"]},"modelUuid":{"type":"string","description":"Model this schedule watches."},"segmentUuid":{"type":"string","description":"Segment whose records are processed."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"changeUuid":{"description":"Change that produced this scheduled batch, if any.","type":"string"},"skip":{"description":"Whether this scheduled tick was skipped.","type":"boolean"},"totalRecordsCount":{"description":"Total records considered by this tick, if known.","type":"number"},"updatedRecordsCount":{"description":"Records updated since the last tick, if known.","type":"number"},"removedRecordsCount":{"description":"Records removed since the last tick, if known.","type":"number"},"addedRecordsCount":{"description":"Records added since the last tick, if known.","type":"number"},"unchangedRecordsCount":{"description":"Records unchanged since the last tick, if known.","type":"number"}},"required":["kind","modelUuid","segmentUuid","changeKinds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a public form.","enum":["form"]},"s3Filename":{"type":"string","description":"S3 key for the submitted form data."},"webhookUrl":{"description":"Webhook to notify when the batch finishes, if set.","type":"string"},"parentRunUuid":{"description":"Parent run that created this form batch, if any.","type":"string"},"parentNodeUuid":{"description":"Parent node that created this form batch, if any.","type":"string"},"parentBatchUuid":{"description":"Parent batch that created this form batch, if any.","type":"string"},"parentAgentUuid":{"description":"Parent agent that created this form batch, if any.","type":"string"},"parentChatUuid":{"description":"Parent chat that created this form batch, if any.","type":"string"},"parentMessageUuid":{"description":"Parent message that created this form batch, if any.","type":"string"}},"required":["kind","s3Filename"],"additionalProperties":false}],"description":"Source of the records in this batch."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this batch failed."},"status":{"type":"string","enum":["pending","syncing","skipped","querying","running","success","error","cancelling","cancelled"],"description":"Current status of this batch."},"runsStatus":{"anyOf":[{"type":"string","enum":["healthy","unhealthy"]},{"type":"null"}],"description":"Whether the runs in this batch are healthy, if known."},"runsCount":{"type":"number","description":"Total number of runs in this batch."},"executedRunsCount":{"type":"number","description":"Runs that have finished executing."},"failedRunsCount":{"type":"number","description":"Runs that failed."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this batch."},"createdAt":{"description":"Time this batch was created.","type":"string"},"updatedAt":{"description":"Time this batch was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this batch finished, if it has."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","releaseUuid","nodes","temporalWorkflowId","traceUuid","data","errorMessage","status","runsStatus","runsCount","executedRunsCount","failedRunsCount","creditsUsedCount","createdAt","updatedAt","finishedAt"],"additionalProperties":false,"title":"Batch","description":"Created batch details."}},"required":["batch"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/batches/list":{"get":{"operationId":"getOrchestrationBatchesList","summary":"List batches","description":"List all orchestration batches (GET /orchestration/batches/list).","tags":["Orchestration - Batches"],"parameters":[{"in":"query","name":"uuids","schema":{"title":"UUIDs","description":"Batch identifiers to include.","type":"array","items":{"type":"string"}},"description":"Batch identifiers to include."},{"in":"query","name":"workflowUuids","schema":{"title":"Workflow UUIDs","description":"Workflow identifiers to include.","type":"array","items":{"type":"string"}},"description":"Workflow identifiers to include."},{"in":"query","name":"userUuid","schema":{"title":"User UUID","description":"User identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"User identifier to filter by."},{"in":"query","name":"releaseUuid","schema":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Release identifier to filter by."},{"in":"query","name":"parentBatchUuid","schema":{"title":"Parent batch UUID","description":"Parent batch identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Parent batch identifier."},{"in":"query","name":"parentRunUuid","schema":{"title":"Parent run UUID","description":"Parent run identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Parent run identifier."},{"in":"query","name":"parentNodeUuid","schema":{"title":"Parent node UUID","description":"Parent node identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Parent node identifier."},{"in":"query","name":"statuses","schema":{"title":"Statuses","description":"Batch statuses to include.","type":"array","items":{"type":"string","enum":["pending","syncing","skipped","querying","running","success","error","cancelling","cancelled"]}},"description":"Batch statuses to include."},{"in":"query","name":"hasRuns","schema":{"title":"Has runs","description":"Filter batches that have runs.","type":"string","enum":["true","false"]},"description":"Filter batches that have runs."},{"in":"query","name":"isSkipped","schema":{"title":"Is skipped","description":"Filter batches by skipped state.","type":"string","enum":["true","false"]},"description":"Filter batches by skipped state."},{"in":"query","name":"isFinished","schema":{"title":"Is finished","description":"Filter batches by finished state.","type":"string","enum":["true","false"]},"description":"Filter batches by finished state."},{"in":"query","name":"includedDataKinds","schema":{"title":"Included data kinds","description":"Data kinds to include.","type":"array","items":{"type":"string","enum":["segment","change","filter","recordIds","records","file","runs","group","schedule","form"]}},"description":"Data kinds to include."},{"in":"query","name":"excludedDataKinds","schema":{"title":"Excluded data kinds","description":"Data kinds to exclude.","type":"array","items":{"type":"string","enum":["segment","change","filter","recordIds","records","file","runs","group","schedule","form"]}},"description":"Data kinds to exclude."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of batches to return.","type":"string"},"description":"Maximum number of batches to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of batches to skip.","type":"string"},"description":"Number of batches to skip."}],"responses":{"200":{"description":"List batches","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"batches":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Batch identifier."},"workspaceUuid":{"type":"string","description":"Workspace this batch belongs to."},"workflowUuid":{"type":"string","description":"Workflow this batch executed."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this batch, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this batch executed, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this batch started."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow executing this batch."},"traceUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trace that records this batch, if any."},"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose records are processed."}},"required":["kind","segmentUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a model change.","enum":["change"]},"changeUuid":{"type":"string","description":"Change that produced this batch."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"segmentUuid":{"type":"string","description":"Segment whose records are processed."}},"required":["kind","changeUuid","changeKinds","segmentUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a filtered model query.","enum":["filter"]},"modelUuid":{"type":"string","description":"Model to query records from."},"filter":{"description":"Filter applied to the model, if any."},"sort":{"description":"Sort applied to the model, if any."},"limit":{"description":"Maximum number of records to include, if set.","type":"number"}},"required":["kind","modelUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from an explicit list of record identifiers.","enum":["recordIds"]},"modelUuid":{"type":"string","description":"Model these records belong to."},"ids":{"type":"array","items":{"type":"string"},"description":"Record identifiers to process."}},"required":["kind","modelUuid","ids"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from watched record changes.","enum":["watchedRecords"]},"modelUuid":{"type":"string","description":"Model being watched."},"filter":{"description":"Filter applied to watched records, if any."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"s3Filename":{"type":"string","description":"S3 key for the watched-record payload."},"meta":{"description":"Additional metadata for this watch batch, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","modelUuid","changeKinds","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from uploaded records.","enum":["records"]},"s3Filename":{"type":"string","description":"S3 key for the uploaded records."}},"required":["kind","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from an uploaded file.","enum":["file"]},"s3Filename":{"type":"string","description":"S3 key for the uploaded file."},"mappings":{"description":"Column mappings from the file to model fields, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from existing runs.","enum":["runs"]},"filter":{"description":"Filter that selects which runs to include."},"reset":{"description":"Reset instructions applied to the selected runs."}},"required":["kind","filter","reset"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch groups child runs under a parent.","enum":["group"]},"s3Filename":{"type":"string","description":"S3 key for the grouped-run payload."},"parentBatchUuid":{"description":"Parent batch this group belongs to, if any.","type":"string"},"parentRunUuid":{"type":"string","description":"Parent run this group belongs to."},"parentNodeUuid":{"type":"string","description":"Parent node that created this group."}},"required":["kind","s3Filename","parentRunUuid","parentNodeUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a scheduled play.","enum":["schedule"]},"modelUuid":{"type":"string","description":"Model this schedule watches."},"segmentUuid":{"type":"string","description":"Segment whose records are processed."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"changeUuid":{"description":"Change that produced this scheduled batch, if any.","type":"string"},"skip":{"description":"Whether this scheduled tick was skipped.","type":"boolean"},"totalRecordsCount":{"description":"Total records considered by this tick, if known.","type":"number"},"updatedRecordsCount":{"description":"Records updated since the last tick, if known.","type":"number"},"removedRecordsCount":{"description":"Records removed since the last tick, if known.","type":"number"},"addedRecordsCount":{"description":"Records added since the last tick, if known.","type":"number"},"unchangedRecordsCount":{"description":"Records unchanged since the last tick, if known.","type":"number"}},"required":["kind","modelUuid","segmentUuid","changeKinds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a public form.","enum":["form"]},"s3Filename":{"type":"string","description":"S3 key for the submitted form data."},"webhookUrl":{"description":"Webhook to notify when the batch finishes, if set.","type":"string"},"parentRunUuid":{"description":"Parent run that created this form batch, if any.","type":"string"},"parentNodeUuid":{"description":"Parent node that created this form batch, if any.","type":"string"},"parentBatchUuid":{"description":"Parent batch that created this form batch, if any.","type":"string"},"parentAgentUuid":{"description":"Parent agent that created this form batch, if any.","type":"string"},"parentChatUuid":{"description":"Parent chat that created this form batch, if any.","type":"string"},"parentMessageUuid":{"description":"Parent message that created this form batch, if any.","type":"string"}},"required":["kind","s3Filename"],"additionalProperties":false}],"description":"Source of the records in this batch."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this batch failed."},"status":{"type":"string","enum":["pending","syncing","skipped","querying","running","success","error","cancelling","cancelled"],"description":"Current status of this batch."},"runsStatus":{"anyOf":[{"type":"string","enum":["healthy","unhealthy"]},{"type":"null"}],"description":"Whether the runs in this batch are healthy, if known."},"runsCount":{"type":"number","description":"Total number of runs in this batch."},"executedRunsCount":{"type":"number","description":"Runs that have finished executing."},"failedRunsCount":{"type":"number","description":"Runs that failed."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this batch."},"createdAt":{"description":"Time this batch was created.","type":"string"},"updatedAt":{"description":"Time this batch was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this batch finished, if it has."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","releaseUuid","nodes","temporalWorkflowId","traceUuid","data","errorMessage","status","runsStatus","runsCount","executedRunsCount","failedRunsCount","creditsUsedCount","createdAt","updatedAt","finishedAt"],"additionalProperties":false},"title":"Batches","description":"List of batches."}},"required":["batches"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/batches/{uuid}":{"get":{"operationId":"getOrchestrationBatchesByUuid","summary":"Get batch","description":"Get an orchestration batch by UUID. This is the status resource returned as Location from POST /orchestration/batches. (GET /orchestration/batches/{uuid}).","tags":["Orchestration - Batches"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Batch identifier."},"required":true,"description":"Batch identifier."}],"responses":{"200":{"description":"Get batch","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"batch":{"type":"object","properties":{"uuid":{"type":"string","description":"Batch identifier."},"workspaceUuid":{"type":"string","description":"Workspace this batch belongs to."},"workflowUuid":{"type":"string","description":"Workflow this batch executed."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this batch, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this batch executed, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this batch started."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow executing this batch."},"traceUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trace that records this batch, if any."},"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose records are processed."}},"required":["kind","segmentUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a model change.","enum":["change"]},"changeUuid":{"type":"string","description":"Change that produced this batch."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"segmentUuid":{"type":"string","description":"Segment whose records are processed."}},"required":["kind","changeUuid","changeKinds","segmentUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a filtered model query.","enum":["filter"]},"modelUuid":{"type":"string","description":"Model to query records from."},"filter":{"description":"Filter applied to the model, if any."},"sort":{"description":"Sort applied to the model, if any."},"limit":{"description":"Maximum number of records to include, if set.","type":"number"}},"required":["kind","modelUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from an explicit list of record identifiers.","enum":["recordIds"]},"modelUuid":{"type":"string","description":"Model these records belong to."},"ids":{"type":"array","items":{"type":"string"},"description":"Record identifiers to process."}},"required":["kind","modelUuid","ids"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from watched record changes.","enum":["watchedRecords"]},"modelUuid":{"type":"string","description":"Model being watched."},"filter":{"description":"Filter applied to watched records, if any."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"s3Filename":{"type":"string","description":"S3 key for the watched-record payload."},"meta":{"description":"Additional metadata for this watch batch, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","modelUuid","changeKinds","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from uploaded records.","enum":["records"]},"s3Filename":{"type":"string","description":"S3 key for the uploaded records."}},"required":["kind","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from an uploaded file.","enum":["file"]},"s3Filename":{"type":"string","description":"S3 key for the uploaded file."},"mappings":{"description":"Column mappings from the file to model fields, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","s3Filename"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from existing runs.","enum":["runs"]},"filter":{"description":"Filter that selects which runs to include."},"reset":{"description":"Reset instructions applied to the selected runs."}},"required":["kind","filter","reset"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch groups child runs under a parent.","enum":["group"]},"s3Filename":{"type":"string","description":"S3 key for the grouped-run payload."},"parentBatchUuid":{"description":"Parent batch this group belongs to, if any.","type":"string"},"parentRunUuid":{"type":"string","description":"Parent run this group belongs to."},"parentNodeUuid":{"type":"string","description":"Parent node that created this group."}},"required":["kind","s3Filename","parentRunUuid","parentNodeUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a scheduled play.","enum":["schedule"]},"modelUuid":{"type":"string","description":"Model this schedule watches."},"segmentUuid":{"type":"string","description":"Segment whose records are processed."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds included in this batch."},"changeUuid":{"description":"Change that produced this scheduled batch, if any.","type":"string"},"skip":{"description":"Whether this scheduled tick was skipped.","type":"boolean"},"totalRecordsCount":{"description":"Total records considered by this tick, if known.","type":"number"},"updatedRecordsCount":{"description":"Records updated since the last tick, if known.","type":"number"},"removedRecordsCount":{"description":"Records removed since the last tick, if known.","type":"number"},"addedRecordsCount":{"description":"Records added since the last tick, if known.","type":"number"},"unchangedRecordsCount":{"description":"Records unchanged since the last tick, if known.","type":"number"}},"required":["kind","modelUuid","segmentUuid","changeKinds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Batch is sourced from a public form.","enum":["form"]},"s3Filename":{"type":"string","description":"S3 key for the submitted form data."},"webhookUrl":{"description":"Webhook to notify when the batch finishes, if set.","type":"string"},"parentRunUuid":{"description":"Parent run that created this form batch, if any.","type":"string"},"parentNodeUuid":{"description":"Parent node that created this form batch, if any.","type":"string"},"parentBatchUuid":{"description":"Parent batch that created this form batch, if any.","type":"string"},"parentAgentUuid":{"description":"Parent agent that created this form batch, if any.","type":"string"},"parentChatUuid":{"description":"Parent chat that created this form batch, if any.","type":"string"},"parentMessageUuid":{"description":"Parent message that created this form batch, if any.","type":"string"}},"required":["kind","s3Filename"],"additionalProperties":false}],"description":"Source of the records in this batch."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this batch failed."},"status":{"type":"string","enum":["pending","syncing","skipped","querying","running","success","error","cancelling","cancelled"],"description":"Current status of this batch."},"runsStatus":{"anyOf":[{"type":"string","enum":["healthy","unhealthy"]},{"type":"null"}],"description":"Whether the runs in this batch are healthy, if known."},"runsCount":{"type":"number","description":"Total number of runs in this batch."},"executedRunsCount":{"type":"number","description":"Runs that have finished executing."},"failedRunsCount":{"type":"number","description":"Runs that failed."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this batch."},"createdAt":{"description":"Time this batch was created.","type":"string"},"updatedAt":{"description":"Time this batch was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this batch finished, if it has."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","releaseUuid","nodes","temporalWorkflowId","traceUuid","data","errorMessage","status","runsStatus","runsCount","executedRunsCount","failedRunsCount","creditsUsedCount","createdAt","updatedAt","finishedAt"],"additionalProperties":false,"title":"Batch","description":"Batch details."}},"required":["batch"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/batches/{uuid}/cancel":{"post":{"operationId":"postOrchestrationBatchesByUuidCancel","summary":"Cancel batch","description":"Cancel a running batch (POST /orchestration/batches/{uuid}/cancel).","tags":["Orchestration - Batches"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Batch identifier."},"required":true,"description":"Batch identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Cancel batch","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/batches/{uuid}/download":{"post":{"operationId":"postOrchestrationBatchesByUuidDownload","summary":"Download batch","description":"Download batch results (POST /orchestration/batches/{uuid}/download).","tags":["Orchestration - Batches"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Batch identifier."},"required":true,"description":"Batch identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"outputNodeSlug":{"title":"Output node slug","description":"Output node slug for download.","type":"string"}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Download batch","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","title":"URL","description":"Download URL."}},"required":["url"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/batches/preview":{"post":{"operationId":"postOrchestrationBatchesPreview","summary":"Preview batch","description":"Preview batch data before execution (POST /orchestration/batches/preview).","tags":["Orchestration - Batches"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["segment"],"title":"Kind","description":"Data kind."},"segmentUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Segment UUID","description":"Segment identifier."}},"required":["kind","segmentUuid"]},{"type":"object","properties":{"kind":{"type":"string","enum":["change"],"title":"Kind","description":"Data kind."},"changeUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Change UUID","description":"Change identifier."},"changeKinds":{"type":"array","items":{"type":"string","enum":["added","updated","removed","unchanged"]},"title":"Change kinds","description":"Change kinds to include."}},"required":["kind","changeUuid","changeKinds"]},{"type":"object","properties":{"kind":{"type":"string","enum":["filter"],"title":"Kind","description":"Data kind."},"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"filter":{"title":"Filter","description":"Filter criteria.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},"sort":{"title":"Sort","description":"Sort criteria.","type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"]}},"limit":{"title":"Limit","description":"Maximum number of records.","type":"number"}},"required":["kind","modelUuid"]},{"type":"object","properties":{"kind":{"type":"string","enum":["file"],"title":"Kind","description":"Data kind."},"s3Filename":{"type":"string","title":"S3 filename","description":"S3 file identifier."}},"required":["kind","s3Filename"]},{"type":"object","properties":{"kind":{"type":"string","enum":["runs"],"title":"Kind","description":"Data kind."},"filter":{"allOf":[{"type":"object","properties":{"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentRunUuid":{"title":"Parent run UUID","description":"Parent run identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether the run is a group parent.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Executions filter criteria.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]}}},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Filter kind.","enum":["runs"]},"uuids":{"title":"UUIDs","description":"Run identifiers to include.","type":"array","items":{"type":"string"}},"statuses":{"title":"Statuses","description":"Run statuses to include.","type":"array","items":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"]}}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","title":"Kind","description":"Filter kind.","enum":["records"]},"ids":{"title":"IDs","description":"Record identifiers to include.","type":"array","items":{"type":"string"}},"title":{"title":"Title","description":"Record title to filter by.","type":"string"}},"required":["kind"]}]}],"title":"Filter","description":"Runs filter criteria."},"reset":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","title":"From","description":"Reset from the last node.","enum":["lastNode"]}},"required":["from"]},{"type":"object","properties":{"from":{"type":"string","title":"From","description":"Reset from the first node.","enum":["firstNode"]}},"required":["from"]},{"type":"object","properties":{"from":{"type":"string","title":"From","description":"Reset from the next node.","enum":["nextNode"]}},"required":["from"]},{"type":"object","properties":{"from":{"type":"string","title":"From","description":"Reset from a specific node.","enum":["node"]},"nodeUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Node UUID","description":"Node identifier to reset from."}},"required":["from","nodeUuid"]}],"title":"Reset","description":"Reset options."}},"required":["kind","filter","reset"]},{"type":"object","properties":{"kind":{"type":"string","enum":["recordIds"],"title":"Kind","description":"Data kind."},"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"ids":{"type":"array","items":{"type":"string"},"title":"IDs","description":"Record identifiers."}},"required":["kind","modelUuid","ids"]},{"type":"object","properties":{"kind":{"type":"string","enum":["group"],"title":"Kind","description":"Data kind."},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentRunUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Parent run UUID","description":"Parent run identifier."},"parentNodeUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Parent node UUID","description":"Parent node identifier."},"items":{"type":"array","items":{},"title":"Items","description":"Grouped items."}},"required":["kind","parentRunUuid","parentNodeUuid","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["records"],"title":"Kind","description":"Data kind."},"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Inline records."}},"required":["kind","records"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"],"title":"Kind","description":"Data kind."},"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"segmentUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Segment UUID","description":"Segment identifier."},"changeKinds":{"type":"array","items":{"type":"string","enum":["added","updated","removed","unchanged"]},"title":"Change kinds","description":"Change kinds to include."}},"required":["kind","modelUuid","segmentUuid","changeKinds"]}],"title":"Data","description":"Batch input data."}},"required":["workflowUuid","data"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Preview batch","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","title":"Outcome","description":"Preview outcome.","enum":["previewed"]},"count":{"type":"number","title":"Count","description":"Total number of records."},"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Previewed records."},"isRefreshing":{"type":"boolean","title":"Is refreshing","description":"Whether a model refresh was still running, so very recent writes may be missing. Fetch again shortly for fresher data."}},"required":["outcome","count","records","isRefreshing"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/nodes/compute":{"post":{"operationId":"postOrchestrationNodesCompute","summary":"Compute node","description":"Compute node output (POST /orchestration/nodes/compute).","tags":["Orchestration - Nodes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"node":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}],"title":"Node","description":"Node configuration."},"groupContext":{"title":"Group context","description":"Group context for node computation.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"context":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Context","description":"Execution context for the node."}},"required":["node","context"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Compute node","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"computedConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Computed config","description":"Computed node configuration."}},"required":["computedConfig"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/nodes/execute":{"post":{"operationId":"postOrchestrationNodesExecute","summary":"Execute node","description":"Execute a node (POST /orchestration/nodes/execute).","tags":["Orchestration - Nodes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"releaseUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Release UUID","description":"Release identifier."},"node":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}],"title":"Node","description":"Node configuration."},"computedConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Computed config","description":"Computed node configuration."},"context":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Context","description":"Execution context for the node."},"groupContext":{"title":"Group context","description":"Group context for the node.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["workflowUuid","releaseUuid","node","computedConfig","context"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Execute node","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","title":"Status","description":"Execution status.","enum":["pending"]},"message":{"type":"string","title":"Message","description":"Status message."},"runUuid":{"title":"Run UUID","description":"Identifier of the launched run, when available, so the client can poll for its result.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["status","message"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","title":"Status","description":"Execution status.","enum":["error"]},"message":{"type":"string","title":"Message","description":"Error message."},"creditsUsedCount":{"title":"Credits used count","description":"Credits consumed by the execution.","type":"number"},"groupItems":{"title":"Group items","description":"Group items produced by execution.","type":"array","items":{}}},"required":["status","message"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","title":"Status","description":"Execution status.","enum":["success"]},"data":{"title":"Data","description":"Execution result data."},"creditsUsedCount":{"title":"Credits used count","description":"Credits consumed by the execution.","type":"number"},"groupItems":{"title":"Group items","description":"Group items produced by execution.","type":"array","items":{}},"childIndex":{"title":"Child index","description":"Child index in group execution.","type":"number"}},"required":["status","data"],"additionalProperties":false}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/nodes/validate":{"post":{"operationId":"postOrchestrationNodesValidate","summary":"Validate nodes","description":"Validate orchestration nodes (POST /orchestration/nodes/validate).","tags":["Orchestration - Nodes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}]},"title":"Nodes","description":"Array of nodes to validate."}},"required":["nodes"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Validate nodes","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"outcome":{"type":"string","title":"Outcome","description":"Validation outcome.","enum":["valid"]}},"required":["outcome"],"additionalProperties":false},{"type":"object","properties":{"outcome":{"type":"string","title":"Outcome","description":"Validation outcome.","enum":["notValid"]},"invalidNodes":{"type":"array","items":{"$ref":"#/components/schemas/InvalidNode"},"title":"Invalid nodes","description":"List of invalid nodes with reasons."}},"required":["outcome","invalidNodes"],"additionalProperties":false}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/plays":{"post":{"operationId":"postOrchestrationPlays","summary":"Create play","description":"Create a new play (POST /orchestration/plays).","tags":["Orchestration - Plays"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Play name."},"description":{"title":"Description","description":"Play description.","type":"string","minLength":1,"maxLength":1000},"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"filter":{"title":"Filter","description":"Segment filter criteria.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},"sort":{"title":"Sort","description":"Sort criteria.","type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"]}},"limit":{"title":"Limit","description":"Maximum number of records.","type":"number"},"trackingColumnSlugs":{"title":"Tracking column slugs","description":"Tracking column identifiers.","type":"array","items":{"type":"string"}},"changeKinds":{"type":"array","items":{"type":"string","enum":["added","updated","removed","unchanged"]},"title":"Change kinds","description":"Change kinds to include."},"runCreationRule":{"type":"string","enum":["always","once","noConcurrency"],"title":"Run creation rule","description":"Run creation rule."},"schedule":{"title":"Schedule","description":"Play schedule configuration.","anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered by a dbt job.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers this play."}},"required":["type","jobId"]},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this play."}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","description":"Play runs continuously in realtime.","enum":["realtime"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered when another play finishes.","enum":["dependency"]},"playUuid":{"type":"string","description":"Play whose completion triggers this one."}},"required":["type","playUuid"]},{"type":"object","properties":{"type":{"type":"string","description":"Play watches a model for changes.","enum":["watch"]}},"required":["type"]}]},"folderUuid":{"title":"Folder UUID","description":"Folder identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["name","modelUuid","changeKinds","runCreationRule"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create play","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"play":{"type":"object","properties":{"uuid":{"type":"string","description":"Play identifier."},"workspaceUuid":{"type":"string","description":"Workspace this play belongs to."},"workflowUuid":{"type":"string","description":"Workflow this play runs."},"userUuid":{"type":"string","description":"User who created this play."},"modelUuid":{"type":"string","description":"Model this play watches."},"segmentUuid":{"type":"string","description":"Segment of records this play processes."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds that trigger this play."},"runCreationRule":{"type":"string","enum":["always","once","noConcurrency"],"description":"When a new run is created for a record."},"name":{"type":"string","description":"Play display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this play does, if set."},"schedule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Play watches a model for changes.","enum":["watch"]},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this play."},"meta":{"description":"Additional watch-schedule metadata, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play runs continuously in realtime.","enum":["realtime"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this play."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this play."}},"required":["type","cron","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered by a dbt job.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers this play."}},"required":["type","jobId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered when another play finishes.","enum":["dependency"]},"playUuid":{"type":"string","description":"Play whose completion triggers this one."}},"required":["type","playUuid"],"additionalProperties":false}]},{"type":"null"}],"description":"How this play is scheduled, if set."},"isEnabled":{"type":"boolean","description":"Whether this play is currently enabled."},"healthThreshold":{"type":"number","description":"Failure rate that triggers a health alert."},"healthAlertActions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."},"retry":{"description":"Retry policy for this action, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false}},"required":["config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Action is a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Action calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Action invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Action invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Action calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Actions to run when the play is unhealthy."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this play is filed under, if any."},"createdAt":{"description":"Time this play was created.","type":"string"},"updatedAt":{"description":"Time this play was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this play was deleted, if it has been."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","modelUuid","segmentUuid","changeKinds","runCreationRule","name","description","schedule","isEnabled","healthThreshold","healthAlertActions","folderUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Play","description":"Created play details."}},"required":["play"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/plays/list":{"get":{"operationId":"getOrchestrationPlaysList","summary":"List plays","description":"List all plays (GET /orchestration/plays/list).","tags":["Orchestration - Plays"],"parameters":[{"in":"query","name":"isEnabled","schema":{"title":"Is enabled","description":"Filter plays by enabled state.","type":"boolean"},"description":"Filter plays by enabled state."},{"in":"query","name":"modelUuid","schema":{"title":"Model UUID","description":"Filter plays by model identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter plays by model identifier."},{"in":"query","name":"segmentUuid","schema":{"title":"Segment UUID","description":"Filter plays by segment identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter plays by segment identifier."},{"in":"query","name":"scheduleType","schema":{"title":"Schedule type","description":"Filter plays by schedule type stored on the play schedule.","type":"string","enum":["dbt","cron","realtime","dependency","watch"]},"description":"Filter plays by schedule type stored on the play schedule."}],"responses":{"200":{"description":"List plays","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"plays":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Play identifier."},"workspaceUuid":{"type":"string","description":"Workspace this play belongs to."},"workflowUuid":{"type":"string","description":"Workflow this play runs."},"userUuid":{"type":"string","description":"User who created this play."},"modelUuid":{"type":"string","description":"Model this play watches."},"segmentUuid":{"type":"string","description":"Segment of records this play processes."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds that trigger this play."},"runCreationRule":{"type":"string","enum":["always","once","noConcurrency"],"description":"When a new run is created for a record."},"name":{"type":"string","description":"Play display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this play does, if set."},"schedule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Play watches a model for changes.","enum":["watch"]},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this play."},"meta":{"description":"Additional watch-schedule metadata, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play runs continuously in realtime.","enum":["realtime"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this play."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this play."}},"required":["type","cron","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered by a dbt job.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers this play."}},"required":["type","jobId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered when another play finishes.","enum":["dependency"]},"playUuid":{"type":"string","description":"Play whose completion triggers this one."}},"required":["type","playUuid"],"additionalProperties":false}]},{"type":"null"}],"description":"How this play is scheduled, if set."},"isEnabled":{"type":"boolean","description":"Whether this play is currently enabled."},"healthThreshold":{"type":"number","description":"Failure rate that triggers a health alert."},"healthAlertActions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."},"retry":{"description":"Retry policy for this action, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false}},"required":["config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Action is a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Action calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Action invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Action invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Action calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Actions to run when the play is unhealthy."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this play is filed under, if any."},"createdAt":{"description":"Time this play was created.","type":"string"},"updatedAt":{"description":"Time this play was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this play was deleted, if it has been."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","modelUuid","segmentUuid","changeKinds","runCreationRule","name","description","schedule","isEnabled","healthThreshold","healthAlertActions","folderUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"Plays","description":"List of plays."}},"required":["plays"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/plays/{uuid}":{"get":{"operationId":"getOrchestrationPlaysByUuid","summary":"Get play","description":"Get a play by UUID (GET /orchestration/plays/{uuid}).","tags":["Orchestration - Plays"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Play identifier."},"required":true,"description":"Play identifier."}],"responses":{"200":{"description":"Get play","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"play":{"type":"object","properties":{"uuid":{"type":"string","description":"Play identifier."},"workspaceUuid":{"type":"string","description":"Workspace this play belongs to."},"workflowUuid":{"type":"string","description":"Workflow this play runs."},"userUuid":{"type":"string","description":"User who created this play."},"modelUuid":{"type":"string","description":"Model this play watches."},"segmentUuid":{"type":"string","description":"Segment of records this play processes."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds that trigger this play."},"runCreationRule":{"type":"string","enum":["always","once","noConcurrency"],"description":"When a new run is created for a record."},"name":{"type":"string","description":"Play display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this play does, if set."},"schedule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Play watches a model for changes.","enum":["watch"]},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this play."},"meta":{"description":"Additional watch-schedule metadata, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play runs continuously in realtime.","enum":["realtime"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this play."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this play."}},"required":["type","cron","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered by a dbt job.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers this play."}},"required":["type","jobId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered when another play finishes.","enum":["dependency"]},"playUuid":{"type":"string","description":"Play whose completion triggers this one."}},"required":["type","playUuid"],"additionalProperties":false}]},{"type":"null"}],"description":"How this play is scheduled, if set."},"isEnabled":{"type":"boolean","description":"Whether this play is currently enabled."},"healthThreshold":{"type":"number","description":"Failure rate that triggers a health alert."},"healthAlertActions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."},"retry":{"description":"Retry policy for this action, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false}},"required":["config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Action is a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Action calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Action invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Action invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Action calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Actions to run when the play is unhealthy."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this play is filed under, if any."},"createdAt":{"description":"Time this play was created.","type":"string"},"updatedAt":{"description":"Time this play was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this play was deleted, if it has been."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","modelUuid","segmentUuid","changeKinds","runCreationRule","name","description","schedule","isEnabled","healthThreshold","healthAlertActions","folderUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Play","description":"Play details."}},"required":["play"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putOrchestrationPlaysByUuid","summary":"Update play","description":"Update a play (PUT /orchestration/plays/{uuid}).","tags":["Orchestration - Plays"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Play identifier."},"required":true,"description":"Play identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Play name.","type":"string","minLength":1,"maxLength":255},"description":{"title":"Description","description":"Play description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"isEnabled":{"title":"Is enabled","description":"Whether the play is enabled.","type":"boolean"},"filter":{"title":"Filter","description":"Segment filter criteria.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},"sort":{"title":"Sort","description":"Sort criteria.","anyOf":[{"type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"]}},{"type":"null"}]},"limit":{"title":"Limit","description":"Maximum number of records.","anyOf":[{"type":"number"},{"type":"null"}]},"trackingColumnSlugs":{"title":"Tracking column slugs","description":"Tracking column identifiers.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"changeKinds":{"title":"Change kinds","description":"Change kinds to include.","type":"array","items":{"type":"string","enum":["added","updated","removed","unchanged"]}},"runCreationRule":{"title":"Run creation rule","description":"Run creation rule.","type":"string","enum":["always","once","noConcurrency"]},"schedule":{"title":"Schedule","description":"Play schedule configuration.","anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered by a dbt job.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers this play."}},"required":["type","jobId"]},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this play."}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","description":"Play runs continuously in realtime.","enum":["realtime"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered when another play finishes.","enum":["dependency"]},"playUuid":{"type":"string","description":"Play whose completion triggers this one."}},"required":["type","playUuid"]},{"type":"object","properties":{"type":{"type":"string","description":"Play watches a model for changes.","enum":["watch"]}},"required":["type"]}]},{"type":"null"}]},"healthThreshold":{"title":"Health threshold","description":"Health threshold for alerts.","type":"number"},"healthAlertActions":{"title":"Health alert actions","description":"Health alert actions configuration.","type":"array","items":{"allOf":[{"type":"object","properties":{"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."},"retry":{"description":"Retry policy for this action, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}}},"required":["config"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Action is a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Action calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Action invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Action invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Action calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}]}},"folderUuid":{"title":"Folder UUID","description":"Folder identifier.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"template":{"title":"Template","description":"Template publishing configuration.","type":"object","properties":{"isAvailable":{"type":"boolean","title":"Is available","description":"Whether the template is available."},"scope":{"type":"string","enum":["public","private"],"title":"Scope","description":"Template visibility scope."}},"required":["isAvailable","scope"]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update play","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"play":{"type":"object","properties":{"uuid":{"type":"string","description":"Play identifier."},"workspaceUuid":{"type":"string","description":"Workspace this play belongs to."},"workflowUuid":{"type":"string","description":"Workflow this play runs."},"userUuid":{"type":"string","description":"User who created this play."},"modelUuid":{"type":"string","description":"Model this play watches."},"segmentUuid":{"type":"string","description":"Segment of records this play processes."},"changeKinds":{"type":"array","items":{"type":"string"},"description":"Record change kinds that trigger this play."},"runCreationRule":{"type":"string","enum":["always","once","noConcurrency"],"description":"When a new run is created for a record."},"name":{"type":"string","description":"Play display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this play does, if set."},"schedule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Play watches a model for changes.","enum":["watch"]},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this play."},"meta":{"description":"Additional watch-schedule metadata, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play runs continuously in realtime.","enum":["realtime"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this play."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this play."}},"required":["type","cron","temporalScheduleWorkflowId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered by a dbt job.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers this play."}},"required":["type","jobId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Play is triggered when another play finishes.","enum":["dependency"]},"playUuid":{"type":"string","description":"Play whose completion triggers this one."}},"required":["type","playUuid"],"additionalProperties":false}]},{"type":"null"}],"description":"How this play is scheduled, if set."},"isEnabled":{"type":"boolean","description":"Whether this play is currently enabled."},"healthThreshold":{"type":"number","description":"Failure rate that triggers a health alert."},"healthAlertActions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Action-specific configuration."},"retry":{"description":"Retry policy for this action, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false}},"required":["config"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Action is a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Action calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Action invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Action invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Action calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Actions to run when the play is unhealthy."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this play is filed under, if any."},"createdAt":{"description":"Time this play was created.","type":"string"},"updatedAt":{"description":"Time this play was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this play was deleted, if it has been."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","modelUuid","segmentUuid","changeKinds","runCreationRule","name","description","schedule","isEnabled","healthThreshold","healthAlertActions","folderUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Play","description":"Updated play details."}},"required":["play"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteOrchestrationPlaysByUuid","summary":"Remove play","description":"Remove a play (DELETE /orchestration/plays/{uuid}).","tags":["Orchestration - Plays"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Play identifier."},"required":true,"description":"Play identifier."}],"responses":{"200":{"description":"Remove play","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/spans/list":{"post":{"operationId":"postOrchestrationSpansList","summary":"List spans","description":"List flattened execution spans for orchestration runs (one row per executed node within a run) (POST /orchestration/spans/list).","tags":["Orchestration - Spans"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"title":"Workflow UUID","description":"When set, restrict spans to this workflow. Omit to search across workflows in the workspace.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"userUuid":{"title":"User UUID","description":"User identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"traceUuid":{"title":"Trace UUID","description":"Trace identifier to filter by. Returns every span across the trace's run lineage. Raises the maximum `limit` to 1000 so a whole trace can be fetched in one request.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"runUuid":{"title":"Run UUID","description":"Run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"recordId":{"title":"Record ID","description":"Record ID to filter by.","type":"string"},"recordTitle":{"title":"Record title","description":"Record title to filter by (SQL ilike).","type":"string"},"recordTitleOrId":{"title":"Record ID or title","description":"Match record id or record title (each SQL ilike); same pattern as run list.","type":"string"},"search":{"title":"Search","description":"Case-insensitive partial match on record title, record ID, execution title, or error message.","type":"string","minLength":1},"parentRunUuid":{"title":"Parent run UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Filter by parent node UUID on the run.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentAgentUuid":{"title":"Parent agent UUID","description":"When set, restrict spans to rows whose parent agent matches this UUID.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeUuid":{"title":"Node UUID","description":"Node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeKind":{"title":"Node kind","description":"Filter by node kind (native, connector, tool, agent).","type":"string","enum":["native","connector","tool","agent","worker"]},"nodeSlug":{"title":"Node slug","description":"Filter by workflow node slug (exact match).","type":"string"},"nodeIntegrationSlug":{"title":"Node integration slug","description":"Filter by connector integration slug (exact match).","type":"string"},"nodeConnectorUuid":{"title":"Node connector UUID","description":"Filter by connector UUID.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeActionSlug":{"title":"Node action slug","description":"Filter by node action slug (exact match).","type":"string"},"nodeToolUuid":{"title":"Node tool UUID","description":"Filter by tool node UUID.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeAgentUuid":{"title":"Node agent UUID","description":"Filter by agent node UUID.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeWorkerUuid":{"title":"Node worker UUID","description":"Filter by hosted worker UUID on the span.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeReleaseUuid":{"title":"Node release UUID","description":"Filter by release UUID referenced on the node.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"executionTitle":{"title":"Execution title","description":"Filter by execution title (SQL ilike).","type":"string"},"executionTitleOrErrorMessage":{"title":"Execution title or error message","description":"Match execution title or execution error message (each SQL ilike).","type":"string"},"executionStatuses":{"title":"Execution statuses","description":"Execution statuses to include.","type":"array","items":{"type":"string","enum":["pending","success","error"]}},"executionStartedAfter":{"type":"string","title":"Execution started after","description":"Include spans whose execution started after this timestamp (ISO string). Required."},"executionStartedBefore":{"title":"Execution started before","description":"Include spans whose execution started on or before this timestamp (ISO string).","type":"string"},"limit":{"title":"Limit","description":"Maximum number of spans to return.","type":"number"},"offset":{"title":"Offset","description":"Number of spans to skip.","type":"number"}},"required":["executionStartedAfter"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List spans","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"spans":{"type":"array","items":{"type":"object","properties":{"workspaceUuid":{"type":"string","description":"Workspace this span belongs to."},"workflowUuid":{"type":"string","description":"Workflow this span was recorded for."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User associated with this span, if any."},"batchUuid":{"type":"string","description":"Batch this span belongs to."},"traceUuid":{"type":"string","description":"Trace this span belongs to."},"recordId":{"type":"string","description":"Record this span processed."},"recordTitle":{"type":"string","description":"Display title of the record."},"runUuid":{"type":"string","description":"Run this span belongs to."},"runContextS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for the run context, if stored."},"runComputedConfigsS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for computed node configs, if stored."},"parentRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent run, if this span was nested."},"parentNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent node that started this span, if any."},"parentBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent batch that started this span, if any."},"parentAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent agent that started this span, if any."},"parentChatUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent chat that started this span, if any."},"parentMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent message that started this span, if any."},"isGroupParent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this span is the parent of a group, if known."},"nodeUuid":{"type":"string","description":"Node this span executed."},"nodeKind":{"type":"string","enum":["native","connector","tool","agent","worker"],"description":"Kind of node this span executed."},"nodeSlug":{"type":"string","description":"Slug of the executed node."},"nodeActionSlug":{"type":"string","description":"Action slug of the executed node."},"nodeConnectorUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Connector this span called, if any."},"nodeIntegrationSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration this span used, if any."},"nodeToolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool this span invoked, if any."},"nodeAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this span invoked, if any."},"nodeWorkerUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Worker this span called, if any."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this span ran, if pinned."},"nodeBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch started by this node, if any."},"nodeRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run started by this node, if any."},"nodeMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message started by this node, if any."},"nodeChildIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index of the child that was taken, if any."},"nodeWaitUntilFinished":{"type":"boolean","description":"Whether the parent waited for this node to finish."},"nodeNextUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Next node to execute, if any."},"executionIndex":{"type":"number","description":"Index of this execution among the node's executions."},"executionStatus":{"type":"string","enum":["pending","success","error"],"description":"Status of this execution."},"executionErrorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this execution failed."},"executionTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display title for this execution, if set."},"executionIconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Icon shown for this execution, if any."},"executionCreditsUsedCount":{"type":"number","description":"Credits consumed by this execution."},"executionStartedAt":{"description":"Time this execution started.","type":"string"},"executionUpdatedAt":{"description":"Time this execution was last updated.","type":"string"},"executionFinishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this execution finished, if it has."}},"required":["workspaceUuid","workflowUuid","userUuid","batchUuid","traceUuid","recordId","recordTitle","runUuid","runContextS3Filename","runComputedConfigsS3Filename","parentRunUuid","parentNodeUuid","parentBatchUuid","parentAgentUuid","parentChatUuid","parentMessageUuid","isGroupParent","nodeUuid","nodeKind","nodeSlug","nodeActionSlug","nodeConnectorUuid","nodeIntegrationSlug","nodeToolUuid","nodeAgentUuid","nodeWorkerUuid","nodeReleaseUuid","nodeBatchUuid","nodeRunUuid","nodeMessageUuid","nodeChildIndex","nodeWaitUntilFinished","nodeNextUuid","executionIndex","executionStatus","executionErrorMessage","executionTitle","executionIconUrl","executionCreditsUsedCount","executionStartedAt","executionUpdatedAt","executionFinishedAt"],"additionalProperties":false},"title":"Spans","description":"Spans matching the filter."},"count":{"type":"number","title":"Count","description":"Total count of matching spans."}},"required":["spans","count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/spans/count":{"post":{"operationId":"postOrchestrationSpansCount","summary":"Count spans","description":"Count orchestration execution spans (POST /orchestration/spans/count).","tags":["Orchestration - Spans"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"title":"Workflow UUID","description":"When set, restrict spans to this workflow. Omit to search across workflows in the workspace.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"userUuid":{"title":"User UUID","description":"User identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"traceUuid":{"title":"Trace UUID","description":"Trace identifier to filter by. Counts every span across the trace's run lineage.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"runUuid":{"title":"Run UUID","description":"Run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"recordId":{"title":"Record ID","description":"Record ID to filter by.","type":"string"},"recordTitle":{"title":"Record title","description":"Record title to filter by (SQL ilike).","type":"string"},"recordTitleOrId":{"title":"Record ID or title","description":"Match record id or record title (each SQL ilike); same pattern as run list.","type":"string"},"search":{"title":"Search","description":"Case-insensitive partial match on record title, record ID, execution title, or error message.","type":"string","minLength":1},"parentRunUuid":{"title":"Parent run UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Filter by parent node UUID on the run.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentAgentUuid":{"title":"Parent agent UUID","description":"When set, restrict spans to rows whose parent agent matches this UUID.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeUuid":{"title":"Node UUID","description":"Node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeKind":{"title":"Node kind","description":"Filter by node kind (native, connector, tool, agent).","type":"string","enum":["native","connector","tool","agent","worker"]},"nodeSlug":{"title":"Node slug","description":"Filter by workflow node slug (exact match).","type":"string"},"nodeIntegrationSlug":{"title":"Node integration slug","description":"Filter by connector integration slug (exact match).","type":"string"},"nodeConnectorUuid":{"title":"Node connector UUID","description":"Filter by connector UUID.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeActionSlug":{"title":"Node action slug","description":"Filter by node action slug (exact match).","type":"string"},"nodeToolUuid":{"title":"Node tool UUID","description":"Filter by tool node UUID.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeAgentUuid":{"title":"Node agent UUID","description":"Filter by agent node UUID.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeWorkerUuid":{"title":"Node worker UUID","description":"Filter by hosted worker UUID on the span.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodeReleaseUuid":{"title":"Node release UUID","description":"Filter by release UUID referenced on the node.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"executionTitle":{"title":"Execution title","description":"Filter by execution title (SQL ilike).","type":"string"},"executionTitleOrErrorMessage":{"title":"Execution title or error message","description":"Match execution title or execution error message (each SQL ilike).","type":"string"},"executionStatuses":{"title":"Execution statuses","description":"Execution statuses to include.","type":"array","items":{"type":"string","enum":["pending","success","error"]}},"executionStartedAfter":{"type":"string","title":"Execution started after","description":"Include spans whose execution started after this timestamp (ISO string). Required."},"executionStartedBefore":{"title":"Execution started before","description":"Include spans whose execution started on or before this timestamp (ISO string).","type":"string"}},"required":["executionStartedAfter"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Count spans","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","title":"Count","description":"Number of spans matching the filter."}},"required":["count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/query":{"post":{"operationId":"postOrchestrationQuery","summary":"Execute SQL query","description":"Execute a read-only SQL query against orchestration ClickHouse tables (spans, runs, batches, records).  (POST /orchestration/query).","tags":["Orchestration - Query"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":10000,"title":"SQL query","description":"A read-only SELECT statement. Available tables: spans, runs, batches, records. Results are automatically scoped to the authenticated workspace. Example: \"SELECT status, count() FROM runs GROUP BY status\""}},"required":["query"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Execute SQL query","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Rows","description":"Result rows."}},"required":["rows"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/records/list":{"post":{"operationId":"postOrchestrationRecordsList","summary":"List records","description":"List orchestration records (POST /orchestration/records/list).","tags":["Orchestration - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"title":"Workflow UUID","description":"Workflow identifier. Omitted lists the records of every play and tool, which requires a created window of at most 30 days.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"userUuid":{"title":"User UUID","description":"User identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"ids":{"title":"IDs","description":"Record IDs to include.","type":"array","items":{"type":"string"}},"title":{"title":"Title","description":"Record title to match.","type":"string"},"titleOrId":{"title":"Title or ID","description":"Record title or ID to match.","type":"string"},"search":{"title":"Search","description":"Case-insensitive partial match on record title or ID.","type":"string","minLength":1},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Record statuses to include.","type":"array","items":{"type":"string","enum":["pending","running","success","error","cancelled","cancelling"]}},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentRunUuid":{"title":"Parent run UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether to select group parent records.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Execution filters for matching records.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include records created after this timestamp. Required when the workflow identifier is omitted.","type":"string"},"createdBefore":{"title":"Created before","description":"Include records created before this timestamp.","type":"string"},"updatedAfter":{"title":"Updated after","description":"Include records updated after this timestamp.","type":"string"},"updatedBefore":{"title":"Updated before","description":"Include records updated before this timestamp.","type":"string"},"limit":{"title":"Limit","description":"Maximum number of records to return.","type":"number"},"offset":{"title":"Offset","description":"Number of records to skip.","type":"number"}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List records","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"workspaceUuid":{"type":"string","description":"Workspace this record belongs to."},"workflowUuid":{"type":"string","description":"Workflow this record was processed by."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User associated with this record, if any."},"id":{"type":"string","description":"Record identifier."},"title":{"type":"string","description":"Record display title."},"runUuid":{"type":"string","description":"Run that processed this record."},"traceUuid":{"type":"string","description":"Trace that records this processing."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release used to process this record, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this record was processed."},"batchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch this record belongs to, if any."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow that processed this record."},"contextS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for the run context, if stored."},"computedConfigsS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for computed node configs, if stored."},"parentRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent run, if this record was nested."},"parentNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent node that started this record, if any."},"parentBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent batch that started this record, if any."},"parentAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent agent that started this record, if any."},"parentChatUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent chat that started this record, if any."},"parentMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent message that started this record, if any."},"isGroupParent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this record is the parent of a group, if known."},"status":{"type":"string","enum":["pending","running","success","error","cancelled","cancelling"],"description":"Current status of this record."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if processing failed."},"executions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"nodeUuid":{"type":"string","description":"Node this execution belongs to."},"nodeSlug":{"type":"string","description":"Slug of the executed node."},"nodeBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch started by this node, if any."},"nodeRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run started by this node, if any."},"nodeMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message started by this node, if any."},"nodeChildIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index of the child that was taken, if any."},"nextNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Next node to execute, if any."},"status":{"type":"string","enum":["pending","success","error"],"description":"Current status of this execution."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this execution failed."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display title for this execution, if set."},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Icon shown for this execution, if any."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this execution."},"nodeWaitUntilFinished":{"type":"boolean","description":"Whether the parent waited for this node to finish."}},"required":["nodeUuid","nodeSlug","nodeBatchUuid","nodeRunUuid","nodeMessageUuid","nodeChildIndex","nextNodeUuid","status","errorMessage","title","iconUrl","creditsUsedCount","nodeWaitUntilFinished"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution ran a native action.","enum":["native"]},"nodeActionSlug":{"type":"string","description":"Native action that ran."}},"required":["nodeKind","nodeActionSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a connector.","enum":["connector"]},"nodeActionSlug":{"type":"string","description":"Connector action that ran."},"nodeConnectorUuid":{"type":"string","description":"Connector this execution called."},"nodeIntegrationSlug":{"type":"string","description":"Integration this execution used."},"nodeWorkerUuid":{"description":"Worker this execution called, if any.","type":"string"}},"required":["nodeKind","nodeActionSlug","nodeConnectorUuid","nodeIntegrationSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked a tool.","enum":["tool"]},"nodeToolUuid":{"type":"string","description":"Tool this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool release this execution ran, if pinned."}},"required":["nodeKind","nodeToolUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked an agent.","enum":["agent"]},"nodeAgentUuid":{"type":"string","description":"Agent this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent release this execution ran, if pinned."}},"required":["nodeKind","nodeAgentUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a worker.","enum":["worker"]},"nodeWorkerUuid":{"type":"string","description":"Worker this execution called."}},"required":["nodeKind","nodeWorkerUuid"],"additionalProperties":false}]}]},"description":"Node executions for this record."},"createdAt":{"description":"Time this record was created.","type":"string"},"updatedAt":{"description":"Time this record was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time processing finished, if it has."}},"required":["workspaceUuid","workflowUuid","userUuid","id","title","runUuid","traceUuid","releaseUuid","nodes","batchUuid","temporalWorkflowId","contextS3Filename","computedConfigsS3Filename","parentRunUuid","parentNodeUuid","parentBatchUuid","parentAgentUuid","parentChatUuid","parentMessageUuid","isGroupParent","status","errorMessage","executions","createdAt","updatedAt","finishedAt"],"additionalProperties":false},"title":"Records","description":"Records matching the filter."},"count":{"type":"number","title":"Count","description":"Total count of matching records."}},"required":["records","count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/records/count":{"post":{"operationId":"postOrchestrationRecordsCount","summary":"Count records","description":"Count orchestration records (POST /orchestration/records/count).","tags":["Orchestration - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"title":"Workflow UUID","description":"Workflow identifier. Omitted counts the records of every play and tool, which requires a created window of at most 30 days.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"userUuid":{"title":"User UUID","description":"User identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"ids":{"title":"IDs","description":"Record IDs to include.","type":"array","items":{"type":"string"}},"title":{"title":"Title","description":"Record title to match.","type":"string"},"titleOrId":{"title":"Title or ID","description":"Record title or ID to match.","type":"string"},"search":{"title":"Search","description":"Case-insensitive partial match on record title or ID.","type":"string","minLength":1},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Record statuses to include.","type":"array","items":{"type":"string","enum":["pending","running","success","error","cancelled","cancelling"]}},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentRunUuid":{"title":"Parent run UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether to select group parent records.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Execution filters for matching records.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include records created after this timestamp. Required when the workflow identifier is omitted.","type":"string"},"createdBefore":{"title":"Created before","description":"Include records created before this timestamp.","type":"string"},"updatedAfter":{"title":"Updated after","description":"Include records updated after this timestamp.","type":"string"},"updatedBefore":{"title":"Updated before","description":"Include records updated before this timestamp.","type":"string"}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Count records","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","title":"Count","description":"Number of records matching the filter."}},"required":["count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/records/download":{"post":{"operationId":"postOrchestrationRecordsDownload","summary":"Download records","description":"Download orchestration records (POST /orchestration/records/download).","tags":["Orchestration - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"ids":{"title":"IDs","description":"Record IDs to include.","type":"array","items":{"type":"string"}},"runUuids":{"title":"Run UUIDs","description":"Run UUIDs of the records to include.","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"title":{"title":"Title","description":"Record title to match.","type":"string"},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Record statuses to include.","type":"array","items":{"type":"string","enum":["pending","running","success","error","cancelled","cancelling"]}},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentRunUuid":{"title":"Parent run UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether to select group parent records.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Execution filters for matching records.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include records created after this timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include records created before this timestamp.","type":"string"},"updatedAfter":{"title":"Updated after","description":"Include records updated after this timestamp.","type":"string"},"updatedBefore":{"title":"Updated before","description":"Include records updated before this timestamp.","type":"string"},"limit":{"title":"Limit","description":"Maximum number of records to export.","type":"number"},"offset":{"title":"Offset","description":"Number of records to skip before export.","type":"number"}},"required":["workflowUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Download records","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","title":"URL","description":"Download URL for the exported records."}},"required":["url"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/records/download-outputs":{"post":{"operationId":"postOrchestrationRecordsDownloadOutputs","summary":"Download record outputs","description":"Download orchestration record outputs with input and output node contexts (POST /orchestration/records/download-outputs).","tags":["Orchestration - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"outputNodeSlug":{"title":"Output node slug","description":"Output node slug for download.","type":"string"},"format":{"title":"Format","description":"Export format. Defaults to csv.","type":"string","enum":["csv","json"]},"ids":{"title":"IDs","description":"Record IDs to include.","type":"array","items":{"type":"string"}},"runUuids":{"title":"Run UUIDs","description":"Run UUIDs of the records to include.","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"title":{"title":"Title","description":"Record title to match.","type":"string"},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Record statuses to include.","type":"array","items":{"type":"string","enum":["pending","running","success","error","cancelled","cancelling"]}},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentRunUuid":{"title":"Parent run UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether to select group parent records.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Execution filters for matching records.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include records created after this timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include records created before this timestamp.","type":"string"}},"required":["workflowUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Download record outputs","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","title":"URL","description":"Download URL for the exported record outputs."}},"required":["url"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/records/metrics":{"post":{"operationId":"postOrchestrationRecordsMetrics","summary":"Get record metrics","description":"Get metrics for orchestration records (POST /orchestration/records/metrics).","tags":["Orchestration - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"createdAfter":{"title":"Created after","description":"Include records created after this timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include records created before this timestamp.","type":"string"}},"required":["workflowUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Get record metrics","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"recordMetrics":{"type":"array","items":{"type":"object","properties":{"nodeUuid":{"type":"string","description":"Node these metrics describe."},"totalExecutionsCount":{"type":"number","description":"Total number of executions for this node."},"pendingExecutionsCount":{"type":"number","description":"Executions waiting to start."},"runningExecutionsCount":{"type":"number","description":"Executions currently running."},"successExecutionsCount":{"type":"number","description":"Executions that succeeded."},"errorExecutionsCount":{"type":"number","description":"Executions that failed."},"cancellingExecutionsCount":{"type":"number","description":"Executions that are being cancelled."},"cancelledExecutionsCount":{"type":"number","description":"Executions that were cancelled."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this node's executions."}},"required":["nodeUuid","totalExecutionsCount","pendingExecutionsCount","runningExecutionsCount","successExecutionsCount","errorExecutionsCount","cancellingExecutionsCount","cancelledExecutionsCount","creditsUsedCount"],"additionalProperties":false},"title":"Record metrics","description":"Aggregated record metrics."}},"required":["recordMetrics"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/records/cancel":{"post":{"operationId":"postOrchestrationRecordsCancel","summary":"Cancel records","description":"Cancel running orchestration records (POST /orchestration/records/cancel).","tags":["Orchestration - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"ids":{"type":"array","items":{"type":"string"},"title":"IDs","description":"Record IDs to cancel."}},"required":["workflowUuid","ids"],"additionalProperties":false},{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"title":{"title":"Title","description":"Record title to match.","type":"string"},"titleOrId":{"title":"Title or ID","description":"Record title or ID to match.","type":"string"},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentRunUuid":{"title":"Parent run UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether to select group parent records.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Execution filters for matching records.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include records created after this timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include records created before this timestamp.","type":"string"}},"required":["workflowUuid"],"additionalProperties":false}],"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Cancel records","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/releases/draft/deploy":{"post":{"operationId":"postOrchestrationReleasesDraftDeploy","summary":"Deploy draft release","description":"Deploy a draft release (POST /orchestration/releases/draft/deploy).","tags":["Orchestration - Releases"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow whose draft to deploy."},"version":{"title":"Version","description":"Version to assign to the deployed release.","type":"string","pattern":"^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,4})$"},"description":{"title":"Description","description":"Human-readable description of this release.","type":"string","minLength":1,"maxLength":1000},"nodes":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}]},"title":"Nodes","description":"Nodes to persist on the deployed release."},"formFields":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Field identifier."},"name":{"type":"string","description":"Field display name."},"description":{"description":"Help text for this field, if set.","type":"string"},"placeholder":{"description":"Placeholder shown in the input, if set.","type":"string"},"isRequired":{"description":"Whether the field must be filled.","type":"boolean"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Field accepts this primitive type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this field."}},"required":["kind","enum"]},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Nested field identifier."},"name":{"type":"string","description":"Nested field display name."},"description":{"description":"Help text for this nested field, if set.","type":"string"},"isRequired":{"description":"Whether this nested field must be filled.","type":"boolean"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Nested field accepts this primitive type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Nested field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this nested field."}},"required":["kind","enum"]},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Nested field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Inner field identifier."},"name":{"type":"string","description":"Inner field display name."},"description":{"description":"Help text for this inner field, if set.","type":"string"},"isRequired":{"description":"Whether this inner field must be filled.","type":"boolean"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","any"],"description":"Inner field accepts this primitive type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Inner field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this inner field."}},"required":["kind","enum"]}]}]},"description":"Inner fields inside this nested array."}},"required":["kind","fields"]}]}]},"description":"Nested fields inside this array."}},"required":["kind","fields"]}]}]}},{"type":"null"}],"title":"Form fields","description":"Form fields for tool-style releases. Pass null when the release has none."},"options":{"title":"Options","description":"Optional remapping of connectors and models by integration slug.","type":"object","properties":{"connectorUuidsByIntegrationSlug":{"title":"Connector UUIDs by integration slug","description":"Connector to use for each integration slug.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"modelUuidsByIntegrationSlug":{"title":"Model UUIDs by integration slug","description":"Model to use for each integration slug.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}}},"required":["workflowUuid","nodes","formFields"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Deploy draft release","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"workflowUuid":{"type":"string","description":"Workflow this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"nodes":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Nodes published in this release."},"formFields":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Field identifier."},"name":{"type":"string","description":"Field display name."},"description":{"description":"Help text for this field, if set.","type":"string"},"placeholder":{"description":"Placeholder shown in the input, if set.","type":"string"},"isRequired":{"description":"Whether the field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Nested field identifier."},"name":{"type":"string","description":"Nested field display name."},"description":{"description":"Help text for this nested field, if set.","type":"string"},"isRequired":{"description":"Whether this nested field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Nested field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Nested field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this nested field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Nested field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Inner field identifier."},"name":{"type":"string","description":"Inner field display name."},"description":{"description":"Help text for this inner field, if set.","type":"string"},"isRequired":{"description":"Whether this inner field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","any"],"description":"Inner field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Inner field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this inner field."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Inner fields inside this nested array."}},"required":["kind","fields"],"additionalProperties":false}]}]},"description":"Nested fields inside this array."}},"required":["kind","fields"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Form fields for running this release, if any."},"testRecords":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Test uses an existing record by identifier.","enum":["id"]},"id":{"type":"string","description":"Record identifier to test with."},"data":{"description":"Override data applied on top of the record, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Test uses inline record data.","enum":["data"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Record data to test with."}},"required":["kind","data"],"additionalProperties":false}]},"description":"Records used to test this release."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deleted, if it has been."}},"required":["uuid","parentUuid","workspaceUuid","userUuid","workflowUuid","description","version","status","templateSlug","nodes","formFields","testRecords","deployedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["release"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/releases/list":{"get":{"operationId":"getOrchestrationReleasesList","summary":"List releases","description":"List all releases (GET /orchestration/releases/list).","tags":["Orchestration - Releases"],"parameters":[{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of releases to return.","type":"string"},"description":"Maximum number of releases to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of releases to skip before returning results.","type":"string"},"description":"Number of releases to skip before returning results."},{"in":"query","name":"statuses","schema":{"title":"Statuses","description":"Filter releases to these statuses.","type":"array","items":{"type":"string","enum":["deployed","draft","archived"]}},"description":"Filter releases to these statuses."},{"in":"query","name":"workflowUuid","schema":{"title":"Workflow UUID","description":"Filter releases by workflow identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter releases by workflow identifier."},{"in":"query","name":"userUuid","schema":{"title":"User UUID","description":"Filter releases by the user who created them.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter releases by the user who created them."}],"responses":{"200":{"description":"List releases","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"releases":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"workflowUuid":{"type":"string","description":"Workflow this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"nodes":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Nodes published in this release."},"formFields":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Field identifier."},"name":{"type":"string","description":"Field display name."},"description":{"description":"Help text for this field, if set.","type":"string"},"placeholder":{"description":"Placeholder shown in the input, if set.","type":"string"},"isRequired":{"description":"Whether the field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Nested field identifier."},"name":{"type":"string","description":"Nested field display name."},"description":{"description":"Help text for this nested field, if set.","type":"string"},"isRequired":{"description":"Whether this nested field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Nested field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Nested field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this nested field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Nested field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Inner field identifier."},"name":{"type":"string","description":"Inner field display name."},"description":{"description":"Help text for this inner field, if set.","type":"string"},"isRequired":{"description":"Whether this inner field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","any"],"description":"Inner field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Inner field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this inner field."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Inner fields inside this nested array."}},"required":["kind","fields"],"additionalProperties":false}]}]},"description":"Nested fields inside this array."}},"required":["kind","fields"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Form fields for running this release, if any."},"testRecords":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Test uses an existing record by identifier.","enum":["id"]},"id":{"type":"string","description":"Record identifier to test with."},"data":{"description":"Override data applied on top of the record, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Test uses inline record data.","enum":["data"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Record data to test with."}},"required":["kind","data"],"additionalProperties":false}]},"description":"Records used to test this release."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deleted, if it has been."}},"required":["uuid","parentUuid","workspaceUuid","userUuid","workflowUuid","description","version","status","templateSlug","nodes","formFields","testRecords","deployedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}},"required":["releases"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/releases/draft":{"get":{"operationId":"getOrchestrationReleasesDraft","summary":"Get draft release","description":"Get the draft release (GET /orchestration/releases/draft).","tags":["Orchestration - Releases"],"parameters":[{"in":"query","name":"workflowUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow whose draft release should be returned."},"required":true,"description":"Workflow whose draft release should be returned."}],"responses":{"200":{"description":"Get draft release","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"workflowUuid":{"type":"string","description":"Workflow this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"nodes":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Nodes published in this release."},"formFields":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Field identifier."},"name":{"type":"string","description":"Field display name."},"description":{"description":"Help text for this field, if set.","type":"string"},"placeholder":{"description":"Placeholder shown in the input, if set.","type":"string"},"isRequired":{"description":"Whether the field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Nested field identifier."},"name":{"type":"string","description":"Nested field display name."},"description":{"description":"Help text for this nested field, if set.","type":"string"},"isRequired":{"description":"Whether this nested field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Nested field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Nested field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this nested field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Nested field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Inner field identifier."},"name":{"type":"string","description":"Inner field display name."},"description":{"description":"Help text for this inner field, if set.","type":"string"},"isRequired":{"description":"Whether this inner field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","any"],"description":"Inner field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Inner field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this inner field."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Inner fields inside this nested array."}},"required":["kind","fields"],"additionalProperties":false}]}]},"description":"Nested fields inside this array."}},"required":["kind","fields"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Form fields for running this release, if any."},"testRecords":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Test uses an existing record by identifier.","enum":["id"]},"id":{"type":"string","description":"Record identifier to test with."},"data":{"description":"Override data applied on top of the record, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Test uses inline record data.","enum":["data"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Record data to test with."}},"required":["kind","data"],"additionalProperties":false}]},"description":"Records used to test this release."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deleted, if it has been."}},"required":["uuid","parentUuid","workspaceUuid","userUuid","workflowUuid","description","version","status","templateSlug","nodes","formFields","testRecords","deployedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["release"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/releases/deployed":{"get":{"operationId":"getOrchestrationReleasesDeployed","summary":"Get deployed release","description":"Get the deployed release (GET /orchestration/releases/deployed).","tags":["Orchestration - Releases"],"parameters":[{"in":"query","name":"workflowUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow whose deployed release should be returned."},"required":true,"description":"Workflow whose deployed release should be returned."}],"responses":{"200":{"description":"Get deployed release","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"workflowUuid":{"type":"string","description":"Workflow this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"nodes":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Nodes published in this release."},"formFields":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Field identifier."},"name":{"type":"string","description":"Field display name."},"description":{"description":"Help text for this field, if set.","type":"string"},"placeholder":{"description":"Placeholder shown in the input, if set.","type":"string"},"isRequired":{"description":"Whether the field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Nested field identifier."},"name":{"type":"string","description":"Nested field display name."},"description":{"description":"Help text for this nested field, if set.","type":"string"},"isRequired":{"description":"Whether this nested field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Nested field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Nested field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this nested field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Nested field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Inner field identifier."},"name":{"type":"string","description":"Inner field display name."},"description":{"description":"Help text for this inner field, if set.","type":"string"},"isRequired":{"description":"Whether this inner field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","any"],"description":"Inner field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Inner field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this inner field."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Inner fields inside this nested array."}},"required":["kind","fields"],"additionalProperties":false}]}]},"description":"Nested fields inside this array."}},"required":["kind","fields"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Form fields for running this release, if any."},"testRecords":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Test uses an existing record by identifier.","enum":["id"]},"id":{"type":"string","description":"Record identifier to test with."},"data":{"description":"Override data applied on top of the record, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Test uses inline record data.","enum":["data"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Record data to test with."}},"required":["kind","data"],"additionalProperties":false}]},"description":"Records used to test this release."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deleted, if it has been."}},"required":["uuid","parentUuid","workspaceUuid","userUuid","workflowUuid","description","version","status","templateSlug","nodes","formFields","testRecords","deployedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["release"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/releases/{uuid}":{"get":{"operationId":"getOrchestrationReleasesByUuid","summary":"Get release","description":"Get a release by UUID (GET /orchestration/releases/{uuid}).","tags":["Orchestration - Releases"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Release identifier."},"required":true,"description":"Release identifier."}],"responses":{"200":{"description":"Get release","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"workflowUuid":{"type":"string","description":"Workflow this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"nodes":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Nodes published in this release."},"formFields":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Field identifier."},"name":{"type":"string","description":"Field display name."},"description":{"description":"Help text for this field, if set.","type":"string"},"placeholder":{"description":"Placeholder shown in the input, if set.","type":"string"},"isRequired":{"description":"Whether the field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Nested field identifier."},"name":{"type":"string","description":"Nested field display name."},"description":{"description":"Help text for this nested field, if set.","type":"string"},"isRequired":{"description":"Whether this nested field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Nested field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Nested field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this nested field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Nested field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Inner field identifier."},"name":{"type":"string","description":"Inner field display name."},"description":{"description":"Help text for this inner field, if set.","type":"string"},"isRequired":{"description":"Whether this inner field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","any"],"description":"Inner field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Inner field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this inner field."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Inner fields inside this nested array."}},"required":["kind","fields"],"additionalProperties":false}]}]},"description":"Nested fields inside this array."}},"required":["kind","fields"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Form fields for running this release, if any."},"testRecords":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Test uses an existing record by identifier.","enum":["id"]},"id":{"type":"string","description":"Record identifier to test with."},"data":{"description":"Override data applied on top of the record, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Test uses inline record data.","enum":["data"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Record data to test with."}},"required":["kind","data"],"additionalProperties":false}]},"description":"Records used to test this release."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deleted, if it has been."}},"required":["uuid","parentUuid","workspaceUuid","userUuid","workflowUuid","description","version","status","templateSlug","nodes","formFields","testRecords","deployedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["release"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/releases/draft/update":{"post":{"operationId":"postOrchestrationReleasesDraftUpdate","summary":"Update draft release","description":"Update the draft release (POST /orchestration/releases/draft/update).","tags":["Orchestration - Releases"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow whose draft release to update."},"nodes":{"title":"Nodes","description":"Nodes to persist on the draft release.","type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}]}},"parentUuid":{"title":"Parent UUID","description":"Parent release this draft is based on.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"testRecords":{"title":"Test records","description":"Test records attached to the draft.","type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Test uses an existing record by identifier.","enum":["id"]},"id":{"type":"string","description":"Record identifier to test with."},"data":{"description":"Override data applied on top of the record, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","id"]},{"type":"object","properties":{"kind":{"type":"string","description":"Test uses inline record data.","enum":["data"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Record data to test with."}},"required":["kind","data"]}]}},"formFields":{"title":"Form fields","description":"Form fields for tool-style releases. Pass null to clear.","anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Field identifier."},"name":{"type":"string","description":"Field display name."},"description":{"description":"Help text for this field, if set.","type":"string"},"placeholder":{"description":"Placeholder shown in the input, if set.","type":"string"},"isRequired":{"description":"Whether the field must be filled.","type":"boolean"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Field accepts this primitive type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this field."}},"required":["kind","enum"]},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Nested field identifier."},"name":{"type":"string","description":"Nested field display name."},"description":{"description":"Help text for this nested field, if set.","type":"string"},"isRequired":{"description":"Whether this nested field must be filled.","type":"boolean"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Nested field accepts this primitive type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Nested field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this nested field."}},"required":["kind","enum"]},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Nested field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Inner field identifier."},"name":{"type":"string","description":"Inner field display name."},"description":{"description":"Help text for this inner field, if set.","type":"string"},"isRequired":{"description":"Whether this inner field must be filled.","type":"boolean"}},"required":["slug","name"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","any"],"description":"Inner field accepts this primitive type."}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Inner field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this inner field."}},"required":["kind","enum"]}]}]},"description":"Inner fields inside this nested array."}},"required":["kind","fields"]}]}]},"description":"Nested fields inside this array."}},"required":["kind","fields"]}]}]}},{"type":"null"}]},"options":{"title":"Options","description":"Optional remapping of connectors and models by integration slug.","type":"object","properties":{"connectorUuidsByIntegrationSlug":{"title":"Connector UUIDs by integration slug","description":"Connector to use for each integration slug.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"modelUuidsByIntegrationSlug":{"title":"Model UUIDs by integration slug","description":"Model to use for each integration slug.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}}},"required":["workflowUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update draft release","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this one was created from, if any."},"workspaceUuid":{"type":"string","description":"Workspace this release belongs to."},"userUuid":{"type":"string","description":"User who created this release."},"workflowUuid":{"type":"string","description":"Workflow this release belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"status":{"type":"string","enum":["draft","deployed","archived"],"description":"Whether this release is draft, deployed, or archived."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"nodes":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Nodes published in this release."},"formFields":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Field identifier."},"name":{"type":"string","description":"Field display name."},"description":{"description":"Help text for this field, if set.","type":"string"},"placeholder":{"description":"Placeholder shown in the input, if set.","type":"string"},"isRequired":{"description":"Whether the field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Nested field identifier."},"name":{"type":"string","description":"Nested field display name."},"description":{"description":"Help text for this nested field, if set.","type":"string"},"isRequired":{"description":"Whether this nested field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Nested field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Nested field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this nested field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Nested field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Inner field identifier."},"name":{"type":"string","description":"Inner field display name."},"description":{"description":"Help text for this inner field, if set.","type":"string"},"isRequired":{"description":"Whether this inner field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","any"],"description":"Inner field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Inner field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this inner field."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Inner fields inside this nested array."}},"required":["kind","fields"],"additionalProperties":false}]}]},"description":"Nested fields inside this array."}},"required":["kind","fields"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Form fields for running this release, if any."},"testRecords":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Test uses an existing record by identifier.","enum":["id"]},"id":{"type":"string","description":"Record identifier to test with."},"data":{"description":"Override data applied on top of the record, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Test uses inline record data.","enum":["data"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Record data to test with."}},"required":["kind","data"],"additionalProperties":false}]},"description":"Records used to test this release."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"},"updatedAt":{"description":"Time this release was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deleted, if it has been."}},"required":["uuid","parentUuid","workspaceUuid","userUuid","workflowUuid","description","version","status","templateSlug","nodes","formFields","testRecords","deployedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["release"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/runs":{"post":{"operationId":"postOrchestrationRuns","summary":"Create run","description":"Create a new orchestration run. Returns 202 Accepted; poll Location until the run reaches a terminal status. (POST /orchestration/runs).","tags":["Orchestration - Runs"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"title":"Workflow UUID","description":"Workflow identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"releaseUuid":{"title":"Release UUID","description":"Release identifier to run.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"nodes":{"title":"Nodes","description":"Custom nodes to use for the run.","type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}}},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"]}]}]}},"data":{"title":"Data","description":"Input data for the run."}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"202":{"description":"Run accepted. Poll the Location header until the run reaches a terminal status.","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}},"Location":{"description":"Path of the status resource to poll until the job reaches a terminal status.","schema":{"type":"string","example":"/v1/orchestration/runs/550e8400-e29b-41d4-a716-446655440000"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"uuid":{"type":"string","description":"Run identifier."},"workspaceUuid":{"type":"string","description":"Workspace this run belongs to."},"workflowUuid":{"type":"string","description":"Workflow this run executed."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this run, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this run executed, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this run started."},"batchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch this run belongs to, if any."},"traceUuid":{"type":"string","description":"Trace that records this run."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow executing this run."},"recordId":{"type":"string","description":"Record this run is processing."},"recordTitle":{"type":"string","description":"Display title of the record."},"contextS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for the run context, if stored."},"computedConfigsS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for computed node configs, if stored."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent run, if this run was nested."},"parentNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent node that started this run, if any."},"parentBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent batch that started this run, if any."},"parentAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent agent that started this run, if any."},"parentChatUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent chat that started this run, if any."},"parentMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent message that started this run, if any."},"isGroupParent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this run is the parent of a group, if known."},"status":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"],"description":"Current status of this run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this run failed."},"executions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"nodeUuid":{"type":"string","description":"Node this execution belongs to."},"nodeSlug":{"type":"string","description":"Slug of the executed node."},"nodeBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch started by this node, if any."},"nodeRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run started by this node, if any."},"nodeMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message started by this node, if any."},"nodeChildIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index of the child that was taken, if any."},"nextNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Next node to execute, if any."},"status":{"type":"string","enum":["pending","success","error"],"description":"Current status of this execution."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this execution failed."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display title for this execution, if set."},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Icon shown for this execution, if any."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this execution."},"nodeWaitUntilFinished":{"type":"boolean","description":"Whether the parent waited for this node to finish."}},"required":["nodeUuid","nodeSlug","nodeBatchUuid","nodeRunUuid","nodeMessageUuid","nodeChildIndex","nextNodeUuid","status","errorMessage","title","iconUrl","creditsUsedCount","nodeWaitUntilFinished"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution ran a native action.","enum":["native"]},"nodeActionSlug":{"type":"string","description":"Native action that ran."}},"required":["nodeKind","nodeActionSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a connector.","enum":["connector"]},"nodeActionSlug":{"type":"string","description":"Connector action that ran."},"nodeConnectorUuid":{"type":"string","description":"Connector this execution called."},"nodeIntegrationSlug":{"type":"string","description":"Integration this execution used."},"nodeWorkerUuid":{"description":"Worker this execution called, if any.","type":"string"}},"required":["nodeKind","nodeActionSlug","nodeConnectorUuid","nodeIntegrationSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked a tool.","enum":["tool"]},"nodeToolUuid":{"type":"string","description":"Tool this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool release this execution ran, if pinned."}},"required":["nodeKind","nodeToolUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked an agent.","enum":["agent"]},"nodeAgentUuid":{"type":"string","description":"Agent this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent release this execution ran, if pinned."}},"required":["nodeKind","nodeAgentUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a worker.","enum":["worker"]},"nodeWorkerUuid":{"type":"string","description":"Worker this execution called."}},"required":["nodeKind","nodeWorkerUuid"],"additionalProperties":false}]}]},"description":"Node executions in this run."},"createdAt":{"description":"Time this run was created.","type":"string"},"updatedAt":{"description":"Time this run was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run was deleted, if it has been."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","releaseUuid","nodes","batchUuid","traceUuid","temporalWorkflowId","recordId","recordTitle","contextS3Filename","computedConfigsS3Filename","parentUuid","parentNodeUuid","parentBatchUuid","parentAgentUuid","parentChatUuid","parentMessageUuid","isGroupParent","status","errorMessage","executions","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false,"title":"Run","description":"Created run details."}},"required":["run"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/runs/list":{"post":{"operationId":"postOrchestrationRunsList","summary":"List runs","description":"List orchestration runs (POST /orchestration/runs/list).","tags":["Orchestration - Runs"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"title":"Workflow UUID","description":"Workflow identifier. Omitted lists the runs of every play and tool, which requires a created window of at most 30 days.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"userUuid":{"title":"User UUID","description":"User identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Run statuses to include.","type":"array","items":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"]}},"recordId":{"title":"Record ID","description":"Record ID to filter by.","type":"string"},"recordTitle":{"title":"Record title","description":"Record title to filter by.","type":"string"},"recordTitleOrId":{"title":"Record title or ID","description":"Record title or ID to filter by.","type":"string"},"search":{"title":"Search","description":"Case-insensitive partial match on record title or record ID.","type":"string","minLength":1},"isFinished":{"title":"Is finished","description":"Whether to only select finished runs.","type":"boolean"},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentUuid":{"title":"Parent UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether to select group parent runs.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Execution filters for matching runs.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include runs created after this timestamp. Required when the workflow identifier is omitted.","type":"string"},"createdBefore":{"title":"Created before","description":"Include runs created before this timestamp.","type":"string"},"updatedAfter":{"title":"Updated after","description":"Include runs updated after this timestamp.","type":"string"},"updatedBefore":{"title":"Updated before","description":"Include runs updated before this timestamp.","type":"string"},"limit":{"title":"Limit","description":"Maximum number of runs to return.","type":"number"},"offset":{"title":"Offset","description":"Number of runs to skip.","type":"number"}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List runs","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Run identifier."},"workspaceUuid":{"type":"string","description":"Workspace this run belongs to."},"workflowUuid":{"type":"string","description":"Workflow this run executed."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this run, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this run executed, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this run started."},"batchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch this run belongs to, if any."},"traceUuid":{"type":"string","description":"Trace that records this run."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow executing this run."},"recordId":{"type":"string","description":"Record this run is processing."},"recordTitle":{"type":"string","description":"Display title of the record."},"contextS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for the run context, if stored."},"computedConfigsS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for computed node configs, if stored."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent run, if this run was nested."},"parentNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent node that started this run, if any."},"parentBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent batch that started this run, if any."},"parentAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent agent that started this run, if any."},"parentChatUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent chat that started this run, if any."},"parentMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent message that started this run, if any."},"isGroupParent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this run is the parent of a group, if known."},"status":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"],"description":"Current status of this run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this run failed."},"executions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"nodeUuid":{"type":"string","description":"Node this execution belongs to."},"nodeSlug":{"type":"string","description":"Slug of the executed node."},"nodeBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch started by this node, if any."},"nodeRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run started by this node, if any."},"nodeMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message started by this node, if any."},"nodeChildIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index of the child that was taken, if any."},"nextNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Next node to execute, if any."},"status":{"type":"string","enum":["pending","success","error"],"description":"Current status of this execution."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this execution failed."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display title for this execution, if set."},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Icon shown for this execution, if any."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this execution."},"nodeWaitUntilFinished":{"type":"boolean","description":"Whether the parent waited for this node to finish."}},"required":["nodeUuid","nodeSlug","nodeBatchUuid","nodeRunUuid","nodeMessageUuid","nodeChildIndex","nextNodeUuid","status","errorMessage","title","iconUrl","creditsUsedCount","nodeWaitUntilFinished"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution ran a native action.","enum":["native"]},"nodeActionSlug":{"type":"string","description":"Native action that ran."}},"required":["nodeKind","nodeActionSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a connector.","enum":["connector"]},"nodeActionSlug":{"type":"string","description":"Connector action that ran."},"nodeConnectorUuid":{"type":"string","description":"Connector this execution called."},"nodeIntegrationSlug":{"type":"string","description":"Integration this execution used."},"nodeWorkerUuid":{"description":"Worker this execution called, if any.","type":"string"}},"required":["nodeKind","nodeActionSlug","nodeConnectorUuid","nodeIntegrationSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked a tool.","enum":["tool"]},"nodeToolUuid":{"type":"string","description":"Tool this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool release this execution ran, if pinned."}},"required":["nodeKind","nodeToolUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked an agent.","enum":["agent"]},"nodeAgentUuid":{"type":"string","description":"Agent this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent release this execution ran, if pinned."}},"required":["nodeKind","nodeAgentUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a worker.","enum":["worker"]},"nodeWorkerUuid":{"type":"string","description":"Worker this execution called."}},"required":["nodeKind","nodeWorkerUuid"],"additionalProperties":false}]}]},"description":"Node executions in this run."},"createdAt":{"description":"Time this run was created.","type":"string"},"updatedAt":{"description":"Time this run was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run was deleted, if it has been."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","releaseUuid","nodes","batchUuid","traceUuid","temporalWorkflowId","recordId","recordTitle","contextS3Filename","computedConfigsS3Filename","parentUuid","parentNodeUuid","parentBatchUuid","parentAgentUuid","parentChatUuid","parentMessageUuid","isGroupParent","status","errorMessage","executions","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false},"title":"Runs","description":"Runs matching the filter."},"count":{"type":"number","title":"Count","description":"Total count of matching runs."}},"required":["runs","count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/runs/count":{"post":{"operationId":"postOrchestrationRunsCount","summary":"Count runs","description":"Count orchestration runs (POST /orchestration/runs/count).","tags":["Orchestration - Runs"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"title":"Workflow UUID","description":"Workflow identifier. Omitted counts the runs of every play and tool, which requires a created window of at most 30 days.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"userUuid":{"title":"User UUID","description":"User identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Run statuses to include.","type":"array","items":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"]}},"recordId":{"title":"Record ID","description":"Record ID to filter by.","type":"string"},"recordTitle":{"title":"Record title","description":"Record title to filter by.","type":"string"},"recordTitleOrId":{"title":"Record title or ID","description":"Record title or ID to filter by.","type":"string"},"search":{"title":"Search","description":"Case-insensitive partial match on record title or record ID.","type":"string","minLength":1},"isFinished":{"title":"Is finished","description":"Whether to only select finished runs.","type":"boolean"},"parentUuid":{"title":"Parent UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether to select group parent runs.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Execution filters for matching runs.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include runs created after this timestamp. Required when the workflow identifier is omitted.","type":"string"},"createdBefore":{"title":"Created before","description":"Include runs created before this timestamp.","type":"string"},"updatedAfter":{"title":"Updated after","description":"Include runs updated after this timestamp.","type":"string"},"updatedBefore":{"title":"Updated before","description":"Include runs updated before this timestamp.","type":"string"}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Count runs","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","title":"Count","description":"Number of runs matching the filter."}},"required":["count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/runs/download":{"post":{"operationId":"postOrchestrationRunsDownload","summary":"Download runs","description":"Download orchestration runs (POST /orchestration/runs/download).","tags":["Orchestration - Runs"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"uuids":{"title":"UUIDs","description":"Run UUIDs to include.","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Run statuses to include.","type":"array","items":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"]}},"recordId":{"title":"Record ID","description":"Record ID to filter by.","type":"string"},"recordTitle":{"title":"Record title","description":"Record title to filter by.","type":"string"},"recordTitleOrId":{"title":"Record title or ID","description":"Record title or ID to filter by.","type":"string"},"isFinished":{"title":"Is finished","description":"Whether to only select finished runs.","type":"boolean"},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentUuid":{"title":"Parent UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether to select group parent runs.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Execution filters for matching runs.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include runs created after this timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include runs created before this timestamp.","type":"string"},"updatedAfter":{"title":"Updated after","description":"Include runs updated after this timestamp.","type":"string"},"updatedBefore":{"title":"Updated before","description":"Include runs updated before this timestamp.","type":"string"}},"required":["workflowUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Download runs","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","title":"URL","description":"Download URL for the exported runs."}},"required":["url"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/runs/download-outputs":{"post":{"operationId":"postOrchestrationRunsDownloadOutputs","summary":"Download run outputs","description":"Download orchestration run outputs with input and output node contexts (POST /orchestration/runs/download-outputs).","tags":["Orchestration - Runs"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"outputNodeSlug":{"title":"Output node slug","description":"Output node slug for download.","type":"string"},"format":{"title":"Format","description":"Export format. Defaults to csv.","type":"string","enum":["csv","json"]},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Run statuses to include.","type":"array","items":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"]}},"recordId":{"title":"Record ID","description":"Record ID to filter by.","type":"string"},"recordTitle":{"title":"Record title","description":"Record title to filter by.","type":"string"},"isFinished":{"title":"Is finished","description":"Whether to only select finished runs.","type":"boolean"},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentUuid":{"title":"Parent UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether to select group parent runs.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Execution filters for matching runs.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include runs created after this timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include runs created before this timestamp.","type":"string"},"limit":{"title":"Limit","description":"Maximum number of runs to include in the export.","type":"number"},"offset":{"title":"Offset","description":"Number of runs to skip before exporting.","type":"number"}},"required":["workflowUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Download run outputs","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","title":"URL","description":"Download URL for the exported run outputs."}},"required":["url"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/runs/metrics":{"post":{"operationId":"postOrchestrationRunsMetrics","summary":"Get run metrics","description":"Get metrics for orchestration runs (POST /orchestration/runs/metrics).","tags":["Orchestration - Runs"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"createdAfter":{"title":"Created after","description":"Include runs created after this timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include runs created before this timestamp.","type":"string"}},"required":["workflowUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Get run metrics","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"runMetrics":{"type":"array","items":{"type":"object","properties":{"nodeUuid":{"type":"string","description":"Node these metrics describe."},"totalExecutionsCount":{"type":"number","description":"Total number of executions for this node."},"idleExecutionsCount":{"type":"number","description":"Executions still idle."},"pendingExecutionsCount":{"type":"number","description":"Executions waiting to start."},"runningExecutionsCount":{"type":"number","description":"Executions currently running."},"successExecutionsCount":{"type":"number","description":"Executions that succeeded."},"errorExecutionsCount":{"type":"number","description":"Executions that failed."},"cancellingExecutionsCount":{"type":"number","description":"Executions that are being cancelled."},"cancelledExecutionsCount":{"type":"number","description":"Executions that were cancelled."},"skippedExecutionsCount":{"type":"number","description":"Executions that were skipped."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this node's executions."}},"required":["nodeUuid","totalExecutionsCount","idleExecutionsCount","pendingExecutionsCount","runningExecutionsCount","successExecutionsCount","errorExecutionsCount","cancellingExecutionsCount","cancelledExecutionsCount","skippedExecutionsCount","creditsUsedCount"],"additionalProperties":false},"title":"Run metrics","description":"Aggregated run metrics."}},"required":["runMetrics"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/runs/{uuid}":{"get":{"operationId":"getOrchestrationRunsByUuid","summary":"Get run","description":"Get an orchestration run by UUID. This is the status resource returned as Location from POST /orchestration/runs. (GET /orchestration/runs/{uuid}).","tags":["Orchestration - Runs"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Run identifier."},"required":true,"description":"Run identifier."}],"responses":{"200":{"description":"Get run","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"uuid":{"type":"string","description":"Run identifier."},"workspaceUuid":{"type":"string","description":"Workspace this run belongs to."},"workflowUuid":{"type":"string","description":"Workflow this run executed."},"userUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started this run, if any."},"releaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release this run executed, if any."},"nodes":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Node graph as it was when this run started."},"batchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch this run belongs to, if any."},"traceUuid":{"type":"string","description":"Trace that records this run."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow executing this run."},"recordId":{"type":"string","description":"Record this run is processing."},"recordTitle":{"type":"string","description":"Display title of the record."},"contextS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for the run context, if stored."},"computedConfigsS3Filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key for computed node configs, if stored."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent run, if this run was nested."},"parentNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent node that started this run, if any."},"parentBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent batch that started this run, if any."},"parentAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent agent that started this run, if any."},"parentChatUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent chat that started this run, if any."},"parentMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent message that started this run, if any."},"isGroupParent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this run is the parent of a group, if known."},"status":{"type":"string","enum":["idle","pending","running","success","error","cancelling","cancelled","skipped"],"description":"Current status of this run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this run failed."},"executions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"nodeUuid":{"type":"string","description":"Node this execution belongs to."},"nodeSlug":{"type":"string","description":"Slug of the executed node."},"nodeBatchUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Batch started by this node, if any."},"nodeRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run started by this node, if any."},"nodeMessageUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message started by this node, if any."},"nodeChildIndex":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Index of the child that was taken, if any."},"nextNodeUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Next node to execute, if any."},"status":{"type":"string","enum":["pending","success","error"],"description":"Current status of this execution."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this execution failed."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display title for this execution, if set."},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Icon shown for this execution, if any."},"creditsUsedCount":{"type":"number","description":"Credits consumed by this execution."},"nodeWaitUntilFinished":{"type":"boolean","description":"Whether the parent waited for this node to finish."}},"required":["nodeUuid","nodeSlug","nodeBatchUuid","nodeRunUuid","nodeMessageUuid","nodeChildIndex","nextNodeUuid","status","errorMessage","title","iconUrl","creditsUsedCount","nodeWaitUntilFinished"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution ran a native action.","enum":["native"]},"nodeActionSlug":{"type":"string","description":"Native action that ran."}},"required":["nodeKind","nodeActionSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a connector.","enum":["connector"]},"nodeActionSlug":{"type":"string","description":"Connector action that ran."},"nodeConnectorUuid":{"type":"string","description":"Connector this execution called."},"nodeIntegrationSlug":{"type":"string","description":"Integration this execution used."},"nodeWorkerUuid":{"description":"Worker this execution called, if any.","type":"string"}},"required":["nodeKind","nodeActionSlug","nodeConnectorUuid","nodeIntegrationSlug"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked a tool.","enum":["tool"]},"nodeToolUuid":{"type":"string","description":"Tool this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool release this execution ran, if pinned."}},"required":["nodeKind","nodeToolUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution invoked an agent.","enum":["agent"]},"nodeAgentUuid":{"type":"string","description":"Agent this execution invoked."},"nodeReleaseUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent release this execution ran, if pinned."}},"required":["nodeKind","nodeAgentUuid","nodeReleaseUuid"],"additionalProperties":false},{"type":"object","properties":{"nodeKind":{"type":"string","description":"Execution called a worker.","enum":["worker"]},"nodeWorkerUuid":{"type":"string","description":"Worker this execution called."}},"required":["nodeKind","nodeWorkerUuid"],"additionalProperties":false}]}]},"description":"Node executions in this run."},"createdAt":{"description":"Time this run was created.","type":"string"},"updatedAt":{"description":"Time this run was last updated.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run finished, if it has."},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run was deleted, if it has been."}},"required":["uuid","workspaceUuid","workflowUuid","userUuid","releaseUuid","nodes","batchUuid","traceUuid","temporalWorkflowId","recordId","recordTitle","contextS3Filename","computedConfigsS3Filename","parentUuid","parentNodeUuid","parentBatchUuid","parentAgentUuid","parentChatUuid","parentMessageUuid","isGroupParent","status","errorMessage","executions","createdAt","updatedAt","finishedAt","deletedAt"],"additionalProperties":false,"title":"Run","description":"Run details."},"runComputedConfigs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Run computed configs","description":"Computed configuration values for the run."},"runContext":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Run context","description":"Context values captured for the run."}},"required":["run","runComputedConfigs","runContext"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/runs/cancel":{"post":{"operationId":"postOrchestrationRunsCancel","summary":"Cancel runs","description":"Cancel running orchestration runs (POST /orchestration/runs/cancel).","tags":["Orchestration - Runs"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"uuids":{"type":"array","items":{"type":"string"},"title":"UUIDs","description":"Run identifiers to cancel."}},"required":["workflowUuid","uuids"],"additionalProperties":false},{"type":"object","properties":{"workflowUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Workflow UUID","description":"Workflow identifier."},"recordId":{"title":"Record ID","description":"Record ID to filter by.","type":"string"},"recordTitle":{"title":"Record title","description":"Record title to filter by.","type":"string"},"recordTitleOrId":{"title":"Record title or ID","description":"Record title or ID to filter by.","type":"string"},"releaseUuid":{"title":"Release UUID","description":"Release identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"batchUuid":{"title":"Batch UUID","description":"Batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentBatchUuid":{"title":"Parent batch UUID","description":"Parent batch identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentUuid":{"title":"Parent UUID","description":"Parent run identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parentNodeUuid":{"title":"Parent node UUID","description":"Parent node identifier to filter by.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"isGroupParent":{"title":"Is group parent","description":"Whether to select group parent runs.","type":"boolean"},"executionsFilter":{"title":"Executions filter","description":"Execution filters for matching runs.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How conditions in this group are combined."},"conditions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"Condition matches a node's execution.","enum":["node"]},"nodeSlug":{"type":"string","description":"Node this condition inspects."},"status":{"type":"string","enum":["absent","pending","success","error"],"description":"Required status of that node's execution."},"value":{"description":"Optional value to match on the node output.","type":"string"}},"required":["kind","nodeSlug","status"]},"description":"Node conditions in this group."}},"required":["conjonction","conditions"]},"description":"Groups of node conditions."}},"required":["conjonction","groups"]},"createdAfter":{"title":"Created after","description":"Include runs created after this timestamp.","type":"string"},"createdBefore":{"title":"Created before","description":"Include runs created before this timestamp.","type":"string"}},"required":["workflowUuid"],"additionalProperties":false}],"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Cancel runs","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/templates/list":{"post":{"operationId":"postOrchestrationTemplatesList","summary":"List templates","description":"List all orchestration templates (POST /orchestration/templates/list).","tags":["Orchestration - Templates"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hasDocumentation":{"title":"Has documentation","description":"Filter templates that have documentation.","type":"boolean"},"isPreset":{"title":"Is preset","description":"Filter templates that are presets.","type":"boolean"},"kinds":{"title":"Kinds","description":"Filter templates by kind.","type":"array","items":{"type":"string","enum":["play","tool","workflow"]}}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List templates","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{},"title":"Templates","description":"List of templates."}},"required":["templates"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/templates/{slug}":{"get":{"operationId":"getOrchestrationTemplatesBySlug","summary":"Get template","description":"Get an orchestration template by slug (GET /orchestration/templates/{slug}).","tags":["Orchestration - Templates"],"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug","description":"Template slug."},"required":true,"description":"Template slug."}],"responses":{"200":{"description":"Get template","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"template":{"title":"Template","description":"Template details."}},"required":["template"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/templates/{slug}/documentation":{"get":{"operationId":"getOrchestrationTemplatesBySlugDocumentation","summary":"Get template documentation","description":"Get the documentation for an orchestration template (GET /orchestration/templates/{slug}/documentation).","tags":["Orchestration - Templates"],"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug","description":"Template slug."},"required":true,"description":"Template slug."}],"responses":{"200":{"description":"Get template documentation","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["documentationNotFound"],"title":"Reason","description":"Failure reason."}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"errorMessage":{"type":"string","title":"Error message","description":"Error message when the request fails."}},"required":["errorMessage"],"additionalProperties":false}],"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/tools":{"post":{"operationId":"postOrchestrationTools","summary":"Create tool","description":"Create a new tool (POST /orchestration/tools).","tags":["Orchestration - Tools"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Tool name."},"icon":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Icon is a raw image payload.","enum":["raw"]},"data":{"type":"string","description":"Raw icon data."}},"required":["kind","data"]},{"type":"object","properties":{"kind":{"type":"string","description":"Icon is an emoji.","enum":["emoji"]},"emojiSlug":{"type":"string","description":"Slug of the emoji to show."}},"required":["kind","emojiSlug"]}],"title":"Icon","description":"Tool icon."},"description":{"title":"Description","description":"Tool description.","type":"string","minLength":1,"maxLength":1000},"triggers":{"title":"Triggers","description":"Tool cron triggers.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Payload passed to the tool when this trigger fires."}},"required":["name","description","type","cron","data"]}},"folderUuid":{"title":"Folder UUID","description":"Folder identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["name","icon"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create tool","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"object","properties":{"uuid":{"type":"string","description":"Tool identifier."},"icon":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Icon is a raw image payload.","enum":["raw"]},"data":{"type":"string","description":"Raw icon data."}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Icon is an emoji.","enum":["emoji"]},"emojiSlug":{"type":"string","description":"Slug of the emoji to show."}},"required":["kind","emojiSlug"],"additionalProperties":false}],"description":"Icon shown for this tool."},"workspaceUuid":{"type":"string","description":"Workspace this tool belongs to."},"workflowUuid":{"type":"string","description":"Workflow this tool runs."},"userUuid":{"type":"string","description":"User who created this tool."},"name":{"type":"string","description":"Tool display name."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this tool is filed under, if any."},"creditsCost":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is the min and max of child costs.","enum":["minMax"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is the sum of child costs.","enum":["sum"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is a custom range.","enum":["custom"]},"min":{"type":"number","description":"Minimum credits this tool may cost."},"max":{"type":"number","description":"Maximum credits this tool may cost."}},"required":["kind","min","max"],"additionalProperties":false}],"description":"How credits for this tool are priced."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this tool does, if set."},"isReadOnly":{"type":"boolean","description":"Whether this tool cannot be edited."},"triggers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this trigger."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Payload passed to the tool when this trigger fires."}},"required":["name","description","type","cron","temporalScheduleWorkflowId","data"],"additionalProperties":false},"description":"Triggers that start this tool."},"publicForm":{"anyOf":[{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether the public form is enabled."},"allowedOrigins":{"type":"array","items":{"type":"string"},"description":"Origins allowed to embed this form."},"spam":{"type":"object","properties":{"captchaProvider":{"anyOf":[{"type":"string","enum":["turnstile","hcaptcha"]},{"type":"null"}],"description":"CAPTCHA provider, if enabled."},"captchaSiteKey":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public CAPTCHA site key, if set."},"captchaSecret":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private CAPTCHA secret, if set."},"minFillMillis":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Minimum milliseconds a user must spend filling the form."}},"required":["captchaProvider","captchaSiteKey","captchaSecret","minFillMillis"],"additionalProperties":false,"description":"Spam-protection settings."},"presentation":{"default":null,"description":"Visual presentation of the form, if customized.","anyOf":[{"type":"object","properties":{"theme":{"anyOf":[{"type":"object","properties":{"preset":{"anyOf":[{"type":"string","enum":["light","dark"]},{"type":"null"}],"description":"Named theme preset, if set."},"primaryColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary accent color, if overridden."},"primaryTextColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text color on primary surfaces, if overridden."},"primaryHoverColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hover color for primary surfaces, if overridden."},"textColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Body text color, if overridden."},"mutedColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Muted text color, if overridden."},"backgroundColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Form background color, if overridden."},"borderColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default border color, if overridden."},"borderFocusColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Focused border color, if overridden."},"radius":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Corner radius, if overridden."},"fontFamily":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Font family, if overridden."}},"required":["preset","primaryColor","primaryTextColor","primaryHoverColor","textColor","mutedColor","backgroundColor","borderColor","borderFocusColor","radius","fontFamily"],"additionalProperties":false},{"type":"null"}],"description":"Theme applied to the public form, if customized."}},"required":["theme"],"additionalProperties":false},{"type":"null"}]}},"required":["isEnabled","allowedOrigins","spam","presentation"],"additionalProperties":false},{"type":"null"}],"description":"Public form configuration, if enabled."},"createdAt":{"description":"Time this tool was created.","type":"string"},"updatedAt":{"description":"Time this tool was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this tool was deleted, if it has been."}},"required":["uuid","icon","workspaceUuid","workflowUuid","userUuid","name","folderUuid","creditsCost","description","isReadOnly","triggers","publicForm","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Tool","description":"Created tool details."}},"required":["tool"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/tools/list":{"get":{"operationId":"getOrchestrationToolsList","summary":"List tools","description":"List all tools (GET /orchestration/tools/list).","tags":["Orchestration - Tools"],"responses":{"200":{"description":"List tools","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Tool identifier."},"icon":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Icon is a raw image payload.","enum":["raw"]},"data":{"type":"string","description":"Raw icon data."}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Icon is an emoji.","enum":["emoji"]},"emojiSlug":{"type":"string","description":"Slug of the emoji to show."}},"required":["kind","emojiSlug"],"additionalProperties":false}],"description":"Icon shown for this tool."},"workspaceUuid":{"type":"string","description":"Workspace this tool belongs to."},"workflowUuid":{"type":"string","description":"Workflow this tool runs."},"userUuid":{"type":"string","description":"User who created this tool."},"name":{"type":"string","description":"Tool display name."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this tool is filed under, if any."},"creditsCost":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is the min and max of child costs.","enum":["minMax"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is the sum of child costs.","enum":["sum"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is a custom range.","enum":["custom"]},"min":{"type":"number","description":"Minimum credits this tool may cost."},"max":{"type":"number","description":"Maximum credits this tool may cost."}},"required":["kind","min","max"],"additionalProperties":false}],"description":"How credits for this tool are priced."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this tool does, if set."},"isReadOnly":{"type":"boolean","description":"Whether this tool cannot be edited."},"triggers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this trigger."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Payload passed to the tool when this trigger fires."}},"required":["name","description","type","cron","temporalScheduleWorkflowId","data"],"additionalProperties":false},"description":"Triggers that start this tool."},"publicForm":{"anyOf":[{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether the public form is enabled."},"allowedOrigins":{"type":"array","items":{"type":"string"},"description":"Origins allowed to embed this form."},"spam":{"type":"object","properties":{"captchaProvider":{"anyOf":[{"type":"string","enum":["turnstile","hcaptcha"]},{"type":"null"}],"description":"CAPTCHA provider, if enabled."},"captchaSiteKey":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public CAPTCHA site key, if set."},"captchaSecret":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private CAPTCHA secret, if set."},"minFillMillis":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Minimum milliseconds a user must spend filling the form."}},"required":["captchaProvider","captchaSiteKey","captchaSecret","minFillMillis"],"additionalProperties":false,"description":"Spam-protection settings."},"presentation":{"default":null,"description":"Visual presentation of the form, if customized.","anyOf":[{"type":"object","properties":{"theme":{"anyOf":[{"type":"object","properties":{"preset":{"anyOf":[{"type":"string","enum":["light","dark"]},{"type":"null"}],"description":"Named theme preset, if set."},"primaryColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary accent color, if overridden."},"primaryTextColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text color on primary surfaces, if overridden."},"primaryHoverColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hover color for primary surfaces, if overridden."},"textColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Body text color, if overridden."},"mutedColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Muted text color, if overridden."},"backgroundColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Form background color, if overridden."},"borderColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default border color, if overridden."},"borderFocusColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Focused border color, if overridden."},"radius":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Corner radius, if overridden."},"fontFamily":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Font family, if overridden."}},"required":["preset","primaryColor","primaryTextColor","primaryHoverColor","textColor","mutedColor","backgroundColor","borderColor","borderFocusColor","radius","fontFamily"],"additionalProperties":false},{"type":"null"}],"description":"Theme applied to the public form, if customized."}},"required":["theme"],"additionalProperties":false},{"type":"null"}]}},"required":["isEnabled","allowedOrigins","spam","presentation"],"additionalProperties":false},{"type":"null"}],"description":"Public form configuration, if enabled."},"createdAt":{"description":"Time this tool was created.","type":"string"},"updatedAt":{"description":"Time this tool was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this tool was deleted, if it has been."}},"required":["uuid","icon","workspaceUuid","workflowUuid","userUuid","name","folderUuid","creditsCost","description","isReadOnly","triggers","publicForm","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"Tools","description":"List of tools."}},"required":["tools"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/tools/{uuid}":{"get":{"operationId":"getOrchestrationToolsByUuid","summary":"Get tool","description":"Get a tool by UUID (GET /orchestration/tools/{uuid}).","tags":["Orchestration - Tools"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Tool identifier."},"required":true,"description":"Tool identifier."}],"responses":{"200":{"description":"Get tool","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"object","properties":{"uuid":{"type":"string","description":"Tool identifier."},"icon":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Icon is a raw image payload.","enum":["raw"]},"data":{"type":"string","description":"Raw icon data."}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Icon is an emoji.","enum":["emoji"]},"emojiSlug":{"type":"string","description":"Slug of the emoji to show."}},"required":["kind","emojiSlug"],"additionalProperties":false}],"description":"Icon shown for this tool."},"workspaceUuid":{"type":"string","description":"Workspace this tool belongs to."},"workflowUuid":{"type":"string","description":"Workflow this tool runs."},"userUuid":{"type":"string","description":"User who created this tool."},"name":{"type":"string","description":"Tool display name."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this tool is filed under, if any."},"creditsCost":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is the min and max of child costs.","enum":["minMax"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is the sum of child costs.","enum":["sum"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is a custom range.","enum":["custom"]},"min":{"type":"number","description":"Minimum credits this tool may cost."},"max":{"type":"number","description":"Maximum credits this tool may cost."}},"required":["kind","min","max"],"additionalProperties":false}],"description":"How credits for this tool are priced."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this tool does, if set."},"isReadOnly":{"type":"boolean","description":"Whether this tool cannot be edited."},"triggers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this trigger."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Payload passed to the tool when this trigger fires."}},"required":["name","description","type","cron","temporalScheduleWorkflowId","data"],"additionalProperties":false},"description":"Triggers that start this tool."},"publicForm":{"anyOf":[{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether the public form is enabled."},"allowedOrigins":{"type":"array","items":{"type":"string"},"description":"Origins allowed to embed this form."},"spam":{"type":"object","properties":{"captchaProvider":{"anyOf":[{"type":"string","enum":["turnstile","hcaptcha"]},{"type":"null"}],"description":"CAPTCHA provider, if enabled."},"captchaSiteKey":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public CAPTCHA site key, if set."},"captchaSecret":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private CAPTCHA secret, if set."},"minFillMillis":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Minimum milliseconds a user must spend filling the form."}},"required":["captchaProvider","captchaSiteKey","captchaSecret","minFillMillis"],"additionalProperties":false,"description":"Spam-protection settings."},"presentation":{"default":null,"description":"Visual presentation of the form, if customized.","anyOf":[{"type":"object","properties":{"theme":{"anyOf":[{"type":"object","properties":{"preset":{"anyOf":[{"type":"string","enum":["light","dark"]},{"type":"null"}],"description":"Named theme preset, if set."},"primaryColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary accent color, if overridden."},"primaryTextColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text color on primary surfaces, if overridden."},"primaryHoverColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hover color for primary surfaces, if overridden."},"textColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Body text color, if overridden."},"mutedColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Muted text color, if overridden."},"backgroundColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Form background color, if overridden."},"borderColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default border color, if overridden."},"borderFocusColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Focused border color, if overridden."},"radius":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Corner radius, if overridden."},"fontFamily":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Font family, if overridden."}},"required":["preset","primaryColor","primaryTextColor","primaryHoverColor","textColor","mutedColor","backgroundColor","borderColor","borderFocusColor","radius","fontFamily"],"additionalProperties":false},{"type":"null"}],"description":"Theme applied to the public form, if customized."}},"required":["theme"],"additionalProperties":false},{"type":"null"}]}},"required":["isEnabled","allowedOrigins","spam","presentation"],"additionalProperties":false},{"type":"null"}],"description":"Public form configuration, if enabled."},"createdAt":{"description":"Time this tool was created.","type":"string"},"updatedAt":{"description":"Time this tool was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this tool was deleted, if it has been."}},"required":["uuid","icon","workspaceUuid","workflowUuid","userUuid","name","folderUuid","creditsCost","description","isReadOnly","triggers","publicForm","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Tool","description":"Tool details."}},"required":["tool"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putOrchestrationToolsByUuid","summary":"Update tool","description":"Update a tool (PUT /orchestration/tools/{uuid}).","tags":["Orchestration - Tools"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Tool identifier."},"required":true,"description":"Tool identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Tool name.","type":"string","minLength":1,"maxLength":255},"icon":{"title":"Icon","description":"Tool icon.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Icon is a raw image payload.","enum":["raw"]},"data":{"type":"string","description":"Raw icon data."}},"required":["kind","data"]},{"type":"object","properties":{"kind":{"type":"string","description":"Icon is an emoji.","enum":["emoji"]},"emojiSlug":{"type":"string","description":"Slug of the emoji to show."}},"required":["kind","emojiSlug"]}]},"description":{"title":"Description","description":"Tool description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"folderUuid":{"title":"Folder UUID","description":"Folder identifier.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"triggers":{"title":"Triggers","description":"Tool cron triggers.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Payload passed to the tool when this trigger fires."}},"required":["name","description","type","cron","data"]}},"publicForm":{"title":"Public form","description":"Public, embeddable form configuration. Set to null to disable.","anyOf":[{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether the public form is enabled."},"allowedOrigins":{"type":"array","items":{"type":"string"},"description":"Origins allowed to embed this form."},"spam":{"type":"object","properties":{"captchaProvider":{"anyOf":[{"type":"string","enum":["turnstile","hcaptcha"]},{"type":"null"}],"description":"CAPTCHA provider, if enabled."},"captchaSiteKey":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public CAPTCHA site key, if set."},"captchaSecret":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private CAPTCHA secret, if set."},"minFillMillis":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Minimum milliseconds a user must spend filling the form."}},"required":["captchaProvider","captchaSiteKey","captchaSecret","minFillMillis"],"description":"Spam-protection settings."},"presentation":{"default":null,"description":"Visual presentation of the form, if customized.","anyOf":[{"type":"object","properties":{"theme":{"anyOf":[{"type":"object","properties":{"preset":{"anyOf":[{"type":"string","enum":["light","dark"]},{"type":"null"}],"description":"Named theme preset, if set."},"primaryColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary accent color, if overridden."},"primaryTextColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text color on primary surfaces, if overridden."},"primaryHoverColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hover color for primary surfaces, if overridden."},"textColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Body text color, if overridden."},"mutedColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Muted text color, if overridden."},"backgroundColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Form background color, if overridden."},"borderColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default border color, if overridden."},"borderFocusColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Focused border color, if overridden."},"radius":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Corner radius, if overridden."},"fontFamily":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Font family, if overridden."}},"required":["preset","primaryColor","primaryTextColor","primaryHoverColor","textColor","mutedColor","backgroundColor","borderColor","borderFocusColor","radius","fontFamily"]},{"type":"null"}],"description":"Theme applied to the public form, if customized."}},"required":["theme"]},{"type":"null"}]}},"required":["isEnabled","allowedOrigins","spam"]},{"type":"null"}]},"template":{"title":"Template","description":"Template publishing configuration.","type":"object","properties":{"isAvailable":{"type":"boolean","title":"Is available","description":"Whether the template is available."},"scope":{"type":"string","enum":["public","private"],"title":"Scope","description":"Template visibility scope."}},"required":["isAvailable","scope"]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update tool","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"object","properties":{"uuid":{"type":"string","description":"Tool identifier."},"icon":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Icon is a raw image payload.","enum":["raw"]},"data":{"type":"string","description":"Raw icon data."}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Icon is an emoji.","enum":["emoji"]},"emojiSlug":{"type":"string","description":"Slug of the emoji to show."}},"required":["kind","emojiSlug"],"additionalProperties":false}],"description":"Icon shown for this tool."},"workspaceUuid":{"type":"string","description":"Workspace this tool belongs to."},"workflowUuid":{"type":"string","description":"Workflow this tool runs."},"userUuid":{"type":"string","description":"User who created this tool."},"name":{"type":"string","description":"Tool display name."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this tool is filed under, if any."},"creditsCost":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is the min and max of child costs.","enum":["minMax"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is the sum of child costs.","enum":["sum"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Credits cost is a custom range.","enum":["custom"]},"min":{"type":"number","description":"Minimum credits this tool may cost."},"max":{"type":"number","description":"Maximum credits this tool may cost."}},"required":["kind","min","max"],"additionalProperties":false}],"description":"How credits for this tool are priced."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this tool does, if set."},"isReadOnly":{"type":"boolean","description":"Whether this tool cannot be edited."},"triggers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Trigger display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this trigger does, if set."},"type":{"type":"string","description":"Trigger fires on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that fires this trigger."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this trigger."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Payload passed to the tool when this trigger fires."}},"required":["name","description","type","cron","temporalScheduleWorkflowId","data"],"additionalProperties":false},"description":"Triggers that start this tool."},"publicForm":{"anyOf":[{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Whether the public form is enabled."},"allowedOrigins":{"type":"array","items":{"type":"string"},"description":"Origins allowed to embed this form."},"spam":{"type":"object","properties":{"captchaProvider":{"anyOf":[{"type":"string","enum":["turnstile","hcaptcha"]},{"type":"null"}],"description":"CAPTCHA provider, if enabled."},"captchaSiteKey":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public CAPTCHA site key, if set."},"captchaSecret":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private CAPTCHA secret, if set."},"minFillMillis":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Minimum milliseconds a user must spend filling the form."}},"required":["captchaProvider","captchaSiteKey","captchaSecret","minFillMillis"],"additionalProperties":false,"description":"Spam-protection settings."},"presentation":{"default":null,"description":"Visual presentation of the form, if customized.","anyOf":[{"type":"object","properties":{"theme":{"anyOf":[{"type":"object","properties":{"preset":{"anyOf":[{"type":"string","enum":["light","dark"]},{"type":"null"}],"description":"Named theme preset, if set."},"primaryColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary accent color, if overridden."},"primaryTextColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text color on primary surfaces, if overridden."},"primaryHoverColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hover color for primary surfaces, if overridden."},"textColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Body text color, if overridden."},"mutedColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Muted text color, if overridden."},"backgroundColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Form background color, if overridden."},"borderColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default border color, if overridden."},"borderFocusColor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Focused border color, if overridden."},"radius":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Corner radius, if overridden."},"fontFamily":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Font family, if overridden."}},"required":["preset","primaryColor","primaryTextColor","primaryHoverColor","textColor","mutedColor","backgroundColor","borderColor","borderFocusColor","radius","fontFamily"],"additionalProperties":false},{"type":"null"}],"description":"Theme applied to the public form, if customized."}},"required":["theme"],"additionalProperties":false},{"type":"null"}]}},"required":["isEnabled","allowedOrigins","spam","presentation"],"additionalProperties":false},{"type":"null"}],"description":"Public form configuration, if enabled."},"createdAt":{"description":"Time this tool was created.","type":"string"},"updatedAt":{"description":"Time this tool was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this tool was deleted, if it has been."}},"required":["uuid","icon","workspaceUuid","workflowUuid","userUuid","name","folderUuid","creditsCost","description","isReadOnly","triggers","publicForm","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Tool","description":"Updated tool details."}},"required":["tool"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteOrchestrationToolsByUuid","summary":"Remove tool","description":"Remove a tool (DELETE /orchestration/tools/{uuid}).","tags":["Orchestration - Tools"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Tool identifier."},"required":true,"description":"Tool identifier."}],"responses":{"200":{"description":"Remove tool","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/traces/list":{"post":{"operationId":"postOrchestrationTracesList","summary":"List traces","description":"List orchestration traces. Each trace wraps every span (node execution) across its run lineage; the summary is aggregated at query time directly from orchestration.spans (no separate traces table — spans carries `trace_uuid` with a bloom-filter skipping index). (POST /orchestration/traces/list).","tags":["Orchestration - Traces"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"title":"Workflow UUID","description":"When set, restrict traces to this workflow. Omit to search across workflows in the workspace.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"chatUuid":{"title":"Chat UUID","description":"When set, restrict traces to the one holding this AI chat. Every action an agent takes in a chat shares a single trace.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"agentUuid":{"title":"Agent UUID","description":"When set, restrict traces to those an AI agent started from a chat.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"workerUuid":{"title":"Worker UUID","description":"When set, restrict traces to those this hosted worker opened (cron or inbound HTTP).","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Filter traces by their derived status (`pending` if any span anywhere in the trace is still pending, `error` if a failure stopped the trace, `degraded` if the trace ran to completion despite a span failing — because the failed node fell back — otherwise `success`).","type":"array","items":{"type":"string","enum":["pending","error","degraded","success"]}},"startedAfter":{"type":"string","title":"Started after","description":"Include traces whose first execution started after this timestamp (ISO string). Required."},"startedBefore":{"title":"Started before","description":"Include traces whose first execution started on or before this timestamp (ISO string).","type":"string"},"limit":{"title":"Limit","description":"Maximum number of traces to return.","type":"number"},"offset":{"title":"Offset","description":"Number of traces to skip.","type":"number"}},"required":["startedAfter"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List traces","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"traces":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Trace identifier."},"workspaceUuid":{"type":"string","description":"Workspace this trace belongs to."},"workflowUuid":{"type":"string","description":"Workflow this trace was recorded for."},"rootRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Root run that started this trace, if any."},"rootRecordId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Root record this trace processed, if any."},"rootRecordTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display title of the root record, if any."},"rootUserUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started the root run, if any."},"chatUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Chat this trace belongs to, if any."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this trace belongs to, if any."},"workerUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Worker this trace belongs to, if any."},"spansCount":{"type":"number","description":"Total number of spans in this trace."},"failedSpansCount":{"type":"number","description":"Spans that failed."},"pendingSpansCount":{"type":"number","description":"Spans that are still pending."},"succeededSpansCount":{"type":"number","description":"Spans that succeeded."},"creditsUsedCount":{"type":"number","description":"Credits consumed across this trace."},"startedAt":{"description":"Time this trace started.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this trace finished, if it has."},"updatedAt":{"description":"Time this trace was last updated.","type":"string"},"status":{"type":"string","enum":["pending","error","degraded","success"],"description":"Overall status of this trace."}},"required":["uuid","workspaceUuid","workflowUuid","rootRunUuid","rootRecordId","rootRecordTitle","rootUserUuid","chatUuid","agentUuid","workerUuid","spansCount","failedSpansCount","pendingSpansCount","succeededSpansCount","creditsUsedCount","startedAt","finishedAt","updatedAt","status"],"additionalProperties":false},"title":"Traces","description":"Traces matching the filter."},"count":{"type":"number","title":"Count","description":"Total count of matching traces."}},"required":["traces","count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/traces/count":{"post":{"operationId":"postOrchestrationTracesCount","summary":"Count traces","description":"Count orchestration traces matching the filter. (POST /orchestration/traces/count).","tags":["Orchestration - Traces"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowUuid":{"title":"Workflow UUID","description":"When set, restrict traces to this workflow. Omit to search across workflows in the workspace.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"chatUuid":{"title":"Chat UUID","description":"When set, restrict traces to the one holding this AI chat. Every action an agent takes in a chat shares a single trace.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"agentUuid":{"title":"Agent UUID","description":"When set, restrict traces to those an AI agent started from a chat.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"workerUuid":{"title":"Worker UUID","description":"When set, restrict traces to those this hosted worker opened (cron or inbound HTTP).","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"statuses":{"title":"Statuses","description":"Filter traces by their derived status (`pending` if any span anywhere in the trace is still pending, `error` if a failure stopped the trace, `degraded` if the trace ran to completion despite a span failing — because the failed node fell back — otherwise `success`).","type":"array","items":{"type":"string","enum":["pending","error","degraded","success"]}},"startedAfter":{"type":"string","title":"Started after","description":"Include traces whose first execution started after this timestamp (ISO string). Required."},"startedBefore":{"title":"Started before","description":"Include traces whose first execution started on or before this timestamp (ISO string).","type":"string"}},"required":["startedAfter"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Count traces","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","title":"Count","description":"Number of traces matching the filter."}},"required":["count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/traces/{uuid}":{"get":{"operationId":"getOrchestrationTracesByUuid","summary":"Get trace","description":"Get a single orchestration trace by UUID. (GET /orchestration/traces/{uuid}).","tags":["Orchestration - Traces"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Trace identifier."},"required":true,"description":"Trace identifier."}],"responses":{"200":{"description":"Get trace","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"trace":{"type":"object","properties":{"uuid":{"type":"string","description":"Trace identifier."},"workspaceUuid":{"type":"string","description":"Workspace this trace belongs to."},"workflowUuid":{"type":"string","description":"Workflow this trace was recorded for."},"rootRunUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Root run that started this trace, if any."},"rootRecordId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Root record this trace processed, if any."},"rootRecordTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display title of the root record, if any."},"rootUserUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User who started the root run, if any."},"chatUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Chat this trace belongs to, if any."},"agentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent this trace belongs to, if any."},"workerUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Worker this trace belongs to, if any."},"spansCount":{"type":"number","description":"Total number of spans in this trace."},"failedSpansCount":{"type":"number","description":"Spans that failed."},"pendingSpansCount":{"type":"number","description":"Spans that are still pending."},"succeededSpansCount":{"type":"number","description":"Spans that succeeded."},"creditsUsedCount":{"type":"number","description":"Credits consumed across this trace."},"startedAt":{"description":"Time this trace started.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this trace finished, if it has."},"updatedAt":{"description":"Time this trace was last updated.","type":"string"},"status":{"type":"string","enum":["pending","error","degraded","success"],"description":"Overall status of this trace."}},"required":["uuid","workspaceUuid","workflowUuid","rootRunUuid","rootRecordId","rootRecordTitle","rootUserUuid","chatUuid","agentUuid","workerUuid","spansCount","failedSpansCount","pendingSpansCount","succeededSpansCount","creditsUsedCount","startedAt","finishedAt","updatedAt","status"],"additionalProperties":false,"title":"Trace","description":"Trace details."}},"required":["trace"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/workflows/list":{"get":{"operationId":"getOrchestrationWorkflowsList","summary":"List workflows","description":"List all workflows (GET /orchestration/workflows/list).","tags":["Orchestration - Workflows"],"parameters":[{"in":"query","name":"templateSlug","schema":{"title":"Template slug","description":"Filter workflows by template slug.","type":"string"},"description":"Filter workflows by template slug."}],"responses":{"200":{"description":"List workflows","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workflows":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Workflow identifier."},"workspaceUuid":{"type":"string","description":"Workspace this workflow belongs to."},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowNodeOutput"},"description":"Nested node tree of this workflow."},"createdAt":{"description":"Time this workflow was created.","type":"string"},"updatedAt":{"description":"Time this workflow was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this workflow was deleted, if it has been."},"playUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Play attached to this workflow, if any."},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool attached to this workflow, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this workflow is filed under, if any."},"template":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Template identifier."},"isAvailable":{"type":"boolean","description":"Whether this template can be used."},"scope":{"type":"string","enum":["public","private"],"description":"Whether the template is public or private to the workspace."}},"required":["slug","isAvailable","scope"],"additionalProperties":false},{"type":"null"}],"description":"Template this workflow was created from, if any."},"lastBatch":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Batch identifier."},"status":{"type":"string","enum":["pending","syncing","skipped","querying","running","success","error","cancelling","cancelled"],"description":"Current status of this batch."},"runsStatus":{"anyOf":[{"type":"string","enum":["healthy","unhealthy"]},{"type":"null"}],"description":"Whether the runs in this batch are healthy, if known."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this batch failed."},"createdAt":{"description":"Time this batch was created.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this batch finished, if it has."}},"required":["uuid","status","runsStatus","errorMessage","createdAt","finishedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent batch, if any."},"deployedRelease":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"userUuid":{"type":"string","description":"User who created this release."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"nodes":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Nodes published in this release."},"formFields":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Field identifier."},"name":{"type":"string","description":"Field display name."},"description":{"description":"Help text for this field, if set.","type":"string"},"placeholder":{"description":"Placeholder shown in the input, if set.","type":"string"},"isRequired":{"description":"Whether the field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Nested field identifier."},"name":{"type":"string","description":"Nested field display name."},"description":{"description":"Help text for this nested field, if set.","type":"string"},"isRequired":{"description":"Whether this nested field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Nested field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Nested field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this nested field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Nested field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Inner field identifier."},"name":{"type":"string","description":"Inner field display name."},"description":{"description":"Help text for this inner field, if set.","type":"string"},"isRequired":{"description":"Whether this inner field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","any"],"description":"Inner field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Inner field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this inner field."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Inner fields inside this nested array."}},"required":["kind","fields"],"additionalProperties":false}]}]},"description":"Nested fields inside this array."}},"required":["kind","fields"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Form fields for running this release, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"}},"required":["uuid","userUuid","description","version","nodes","formFields","templateSlug","deployedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Currently deployed release, if any."}},"required":["uuid","workspaceUuid","nodes","createdAt","updatedAt","deletedAt","playUuid","toolUuid","folderUuid","template","lastBatch","deployedRelease"],"additionalProperties":false},"title":"Workflows","description":"List of workflows."}},"required":["workflows"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/orchestration/workflows/{uuid}":{"get":{"operationId":"getOrchestrationWorkflowsByUuid","summary":"Get workflow","description":"Get a workflow by UUID (GET /orchestration/workflows/{uuid}).","tags":["Orchestration - Workflows"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Workflow identifier."},"required":true,"description":"Workflow identifier."}],"responses":{"200":{"description":"Get workflow","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workflow":{"type":"object","properties":{"uuid":{"type":"string","description":"Workflow identifier."},"workspaceUuid":{"type":"string","description":"Workspace this workflow belongs to."},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowNodeOutput"},"description":"Nested node tree of this workflow."},"createdAt":{"description":"Time this workflow was created.","type":"string"},"updatedAt":{"description":"Time this workflow was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this workflow was deleted, if it has been."},"playUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Play attached to this workflow, if any."},"toolUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool attached to this workflow, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this workflow is filed under, if any."},"template":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Template identifier."},"isAvailable":{"type":"boolean","description":"Whether this template can be used."},"scope":{"type":"string","enum":["public","private"],"description":"Whether the template is public or private to the workspace."}},"required":["slug","isAvailable","scope"],"additionalProperties":false},{"type":"null"}],"description":"Template this workflow was created from, if any."},"lastBatch":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Batch identifier."},"status":{"type":"string","enum":["pending","syncing","skipped","querying","running","success","error","cancelling","cancelled"],"description":"Current status of this batch."},"runsStatus":{"anyOf":[{"type":"string","enum":["healthy","unhealthy"]},{"type":"null"}],"description":"Whether the runs in this batch are healthy, if known."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message if this batch failed."},"createdAt":{"description":"Time this batch was created.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this batch finished, if it has."}},"required":["uuid","status","runsStatus","errorMessage","createdAt","finishedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent batch, if any."},"deployedRelease":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Release identifier."},"userUuid":{"type":"string","description":"User who created this release."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Release notes, if any."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Semver of this release, if assigned."},"nodes":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","description":"Node identifier."},"slug":{"type":"string","pattern":"^\\w+$","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Node-specific configuration."},"description":{"description":"What this node does, if set.","type":"string"},"retry":{"description":"Retry policy for this node, if any.","type":"object","properties":{"maximumAttempts":{"description":"Maximum number of attempts before giving up.","type":"number"},"initialInterval":{"description":"Initial delay in milliseconds before the first retry.","type":"number"},"backoffCoefficient":{"description":"Multiplier applied to the delay after each retry.","type":"number"}},"additionalProperties":false},"childrenUuids":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Child node identifiers, including null slots."},"fallbackChildUuid":{"description":"Child to run when this node fails, if set.","type":"string"},"fallbackOnFailure":{"type":"boolean","description":"Whether to follow the fallback child on failure."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position."},"y":{"type":"number","description":"Vertical canvas position."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas position of this node."}},"required":["uuid","slug","config","childrenUuids","fallbackOnFailure","position"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["native"],"description":"Node runs a built-in Cargo action."},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"],"description":"Node calls a connector integration."},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["tool"],"description":"Node invokes a workspace tool."},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["agent"],"description":"Node invokes an agent."},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["worker"],"description":"Node calls a hosted worker."},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."},"headers":{"description":"HTTP headers sent to the worker, if any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]},"description":"Nodes published in this release."},"formFields":{"anyOf":[{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Field identifier."},"name":{"type":"string","description":"Field display name."},"description":{"description":"Help text for this field, if set.","type":"string"},"placeholder":{"description":"Placeholder shown in the input, if set.","type":"string"},"isRequired":{"description":"Whether the field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Nested field identifier."},"name":{"type":"string","description":"Nested field display name."},"description":{"description":"Help text for this nested field, if set.","type":"string"},"isRequired":{"description":"Whether this nested field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","date","any"],"description":"Nested field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Nested field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this nested field."}},"required":["kind","enum"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["array"],"description":"Nested field is a list of nested fields."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Inner field identifier."},"name":{"type":"string","description":"Inner field display name."},"description":{"description":"Help text for this inner field, if set.","type":"string"},"isRequired":{"description":"Whether this inner field must be filled.","type":"boolean"}},"required":["slug","name"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["string","number","boolean","any"],"description":"Inner field accepts this primitive type."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["enum"],"description":"Inner field must be one of a fixed set of values."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for this inner field."}},"required":["kind","enum"],"additionalProperties":false}]}]},"description":"Inner fields inside this nested array."}},"required":["kind","fields"],"additionalProperties":false}]}]},"description":"Nested fields inside this array."}},"required":["kind","fields"],"additionalProperties":false}]}]}},{"type":"null"}],"description":"Form fields for running this release, if any."},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Template this release was created from, if any."},"deployedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this release was deployed, if it has been."},"createdAt":{"description":"Time this release was created.","type":"string"}},"required":["uuid","userUuid","description","version","nodes","formFields","templateSlug","deployedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Currently deployed release, if any."}},"required":["uuid","workspaceUuid","nodes","createdAt","updatedAt","deletedAt","playUuid","toolUuid","folderUuid","template","lastBatch","deployedRelease"],"additionalProperties":false,"title":"Workflow","description":"Workflow details."}},"required":["workflow"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/allocations/list":{"get":{"operationId":"getRevenueOrganizationAllocationsList","summary":"List allocations","description":"List all allocations (GET /revenueOrganization/allocations/list).","tags":["Revenue Organization - Allocations"],"parameters":[{"in":"query","name":"membersUuids","schema":{"title":"Member UUIDs","description":"Filter allocations by member identifiers.","type":"array","items":{"type":"string"}},"description":"Filter allocations by member identifiers."},{"in":"query","name":"capacityUuid","schema":{"title":"Capacity UUID","description":"Filter allocations by capacity identifier.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"description":"Filter allocations by capacity identifier."},{"in":"query","name":"territoryUuid","schema":{"title":"Territory UUID","description":"Filter allocations by territory identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter allocations by territory identifier."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of allocations to return.","type":"string"},"description":"Maximum number of allocations to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of allocations to skip.","type":"string"},"description":"Number of allocations to skip."}],"responses":{"200":{"description":"List allocations","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"allocations":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Allocation identifier."},"memberUuid":{"type":"string","description":"Member this record was assigned to."},"isFallbackMember":{"type":"boolean","description":"Whether this assignment went to the fallback member because no one else was available."},"workspaceUuid":{"type":"string","description":"Workspace this allocation belongs to."},"allocatedBy":{"anyOf":[{"type":"object","properties":{"allocator":{"type":"string","description":"Allocation was made by a workflow node picking members directly.","enum":["workflow"]},"workflowUuid":{"type":"string","description":"Workflow that created this allocation."},"workflowNodeUuid":{"type":"string","description":"Workflow node that created this allocation."},"workflowRunUuid":{"description":"Workflow run that created this allocation, if known.","type":"string"},"membersUuids":{"type":"array","items":{"type":"string"},"description":"Members the workflow considered for this allocation."},"fallbackMemberUuid":{"description":"Member who receives the lead when no one in the pool is available.","type":"string"},"modelUuid":{"description":"Model the allocated record came from, if known.","type":"string"},"recordId":{"description":"Record that was allocated, if known.","type":"string"}},"required":["allocator","workflowUuid","workflowNodeUuid","membersUuids"],"additionalProperties":false},{"type":"object","properties":{"allocator":{"type":"string","description":"Allocation was made by routing through a territory.","enum":["territory"]},"workflowUuid":{"type":"string","description":"Workflow that created this allocation."},"workflowNodeUuid":{"type":"string","description":"Workflow node that created this allocation."},"workflowRunUuid":{"description":"Workflow run that created this allocation, if known.","type":"string"},"territoryUuid":{"type":"string","description":"Territory this allocation was routed through."},"modelUuid":{"description":"Model the allocated record came from, if known.","type":"string"},"recordId":{"description":"Record that was allocated, if known.","type":"string"}},"required":["allocator","workflowUuid","workflowNodeUuid","territoryUuid"],"additionalProperties":false},{"type":"object","properties":{"allocator":{"type":"string","description":"Allocation was synced from a capacity's data model.","enum":["capacity"]}},"required":["allocator"],"additionalProperties":false}],"description":"How this allocation was created."},"capacityUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Capacity that counted this allocation, if any."},"recordIds":{"type":"array","items":{"type":"string"},"description":"Record identifiers assigned in this allocation."},"allocatedAt":{"description":"Time this record was assigned to the member.","type":"string"},"syncedAt":{"description":"Time this allocation was last synced.","type":"string"},"createdAt":{"description":"Time this allocation was created.","type":"string"},"updatedAt":{"description":"Time this allocation was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this allocation was deleted, if it has been."}},"required":["uuid","memberUuid","isFallbackMember","workspaceUuid","allocatedBy","capacityUuid","recordIds","allocatedAt","syncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"Allocations","description":"List of allocations."}},"required":["allocations"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/allocations/{uuid}":{"get":{"operationId":"getRevenueOrganizationAllocationsByUuid","summary":"Get allocation","description":"Get an allocation by UUID (GET /revenueOrganization/allocations/{uuid}).","tags":["Revenue Organization - Allocations"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Allocation identifier."},"required":true,"description":"Allocation identifier."}],"responses":{"200":{"description":"Get allocation","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"allocation":{"type":"object","properties":{"uuid":{"type":"string","description":"Allocation identifier."},"memberUuid":{"type":"string","description":"Member this record was assigned to."},"isFallbackMember":{"type":"boolean","description":"Whether this assignment went to the fallback member because no one else was available."},"workspaceUuid":{"type":"string","description":"Workspace this allocation belongs to."},"allocatedBy":{"anyOf":[{"type":"object","properties":{"allocator":{"type":"string","description":"Allocation was made by a workflow node picking members directly.","enum":["workflow"]},"workflowUuid":{"type":"string","description":"Workflow that created this allocation."},"workflowNodeUuid":{"type":"string","description":"Workflow node that created this allocation."},"workflowRunUuid":{"description":"Workflow run that created this allocation, if known.","type":"string"},"membersUuids":{"type":"array","items":{"type":"string"},"description":"Members the workflow considered for this allocation."},"fallbackMemberUuid":{"description":"Member who receives the lead when no one in the pool is available.","type":"string"},"modelUuid":{"description":"Model the allocated record came from, if known.","type":"string"},"recordId":{"description":"Record that was allocated, if known.","type":"string"}},"required":["allocator","workflowUuid","workflowNodeUuid","membersUuids"],"additionalProperties":false},{"type":"object","properties":{"allocator":{"type":"string","description":"Allocation was made by routing through a territory.","enum":["territory"]},"workflowUuid":{"type":"string","description":"Workflow that created this allocation."},"workflowNodeUuid":{"type":"string","description":"Workflow node that created this allocation."},"workflowRunUuid":{"description":"Workflow run that created this allocation, if known.","type":"string"},"territoryUuid":{"type":"string","description":"Territory this allocation was routed through."},"modelUuid":{"description":"Model the allocated record came from, if known.","type":"string"},"recordId":{"description":"Record that was allocated, if known.","type":"string"}},"required":["allocator","workflowUuid","workflowNodeUuid","territoryUuid"],"additionalProperties":false},{"type":"object","properties":{"allocator":{"type":"string","description":"Allocation was synced from a capacity's data model.","enum":["capacity"]}},"required":["allocator"],"additionalProperties":false}],"description":"How this allocation was created."},"capacityUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Capacity that counted this allocation, if any."},"recordIds":{"type":"array","items":{"type":"string"},"description":"Record identifiers assigned in this allocation."},"allocatedAt":{"description":"Time this record was assigned to the member.","type":"string"},"syncedAt":{"description":"Time this allocation was last synced.","type":"string"},"createdAt":{"description":"Time this allocation was created.","type":"string"},"updatedAt":{"description":"Time this allocation was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this allocation was deleted, if it has been."}},"required":["uuid","memberUuid","isFallbackMember","workspaceUuid","allocatedBy","capacityUuid","recordIds","allocatedAt","syncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Allocation","description":"Allocation details."}},"required":["allocation"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteRevenueOrganizationAllocationsByUuid","summary":"Remove allocation","description":"Remove an allocation (DELETE /revenueOrganization/allocations/{uuid}).","tags":["Revenue Organization - Allocations"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Allocation identifier."},"required":true,"description":"Allocation identifier."}],"responses":{"200":{"description":"Remove allocation","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/allocations/sync":{"post":{"operationId":"postRevenueOrganizationAllocationsSync","summary":"Sync allocations","description":"Sync allocations from external source (POST /revenueOrganization/allocations/sync).","tags":["Revenue Organization - Allocations"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"capacityUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Capacity UUID","description":"Capacity identifier."}},"required":["capacityUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Sync allocations","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/capacities":{"post":{"operationId":"postRevenueOrganizationCapacities","summary":"Create capacity","description":"Create a new capacity (POST /revenueOrganization/capacities).","tags":["Revenue Organization - Capacities"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Capacity name."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"title":"Color","description":"Capacity color."},"description":{"title":"Description","description":"Capacity description.","type":"string","minLength":1,"maxLength":1000},"modelUuid":{"title":"Model UUID","description":"Model identifier for capacity mapping.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"idColumnSlug":{"title":"ID column slug","description":"Identifier column slug.","type":"string"},"timeColumnSlug":{"title":"Time column slug","description":"Time column slug.","type":"string"},"memberCapacity":{"title":"Member capacity","description":"Capacity per member.","type":"number"},"allocationExpirationPolicy":{"title":"Allocation expiration policy","description":"Allocation expiration schedule.","anyOf":[{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["hourly"]},"minute":{"title":"Minute","description":"Minute of the hour.","type":"number"}},"required":["interval"]},{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["daily"]},"time":{"title":"Time","description":"Time of day.","type":"string"}},"required":["interval"]},{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["weekly"]},"weekDay":{"title":"Week day","description":"Day of the week.","type":"number"},"time":{"title":"Time","description":"Time of day.","type":"string"}},"required":["interval"]},{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["monthly"]},"day":{"title":"Day","description":"Day of the month.","type":"number"},"time":{"title":"Time","description":"Time of day.","type":"string"}},"required":["interval"]},{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["quarterly"]},"month":{"title":"Month","description":"Month of the quarter.","type":"number"},"day":{"title":"Day","description":"Day of the month.","type":"number"},"time":{"title":"Time","description":"Time of day.","type":"string"}},"required":["interval"]},{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["yearly"]},"month":{"title":"Month","description":"Month of the year.","type":"number"},"day":{"title":"Day","description":"Day of the month.","type":"number"},"time":{"title":"Time","description":"Time of day.","type":"string"}},"required":["interval"]}]},"filter":{"title":"Filter","description":"Filter criteria for capacity.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"description":"String value, values, or expression to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"description":"Number or expression to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"description":"Lower bound of the inclusive range, or an expression."},"lastValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"description":"Value or expression to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"description":"Lower bound of the inclusive range, or an expression."},"otherValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"description":"Value or expression to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"description":"Lower bound of the inclusive range, or an expression."},"otherValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"description":"Value or expression to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"description":"Lower bound of the inclusive range, or an expression."},"otherValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"description":"Date or expression to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"description":"Lower bound of the inclusive range, or an expression."},"lastValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"description":"Occurrence count or expression to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"description":"String value, values, or expression to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"description":"Number or expression to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"description":"Lower bound of the inclusive range, or an expression."},"lastValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"description":"Value or expression to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"description":"Lower bound of the inclusive range, or an expression."},"otherValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"description":"Value or expression to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"description":"Lower bound of the inclusive range, or an expression."},"otherValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"description":"Date or expression to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"description":"Lower bound of the inclusive range, or an expression."},"lastValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"description":"Enrollment event count or expression to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]}},"required":["name","color"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create capacity","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"capacity":{"type":"object","properties":{"uuid":{"type":"string","description":"Capacity identifier."},"workspaceUuid":{"type":"string","description":"Workspace this capacity belongs to."},"name":{"type":"string","description":"Capacity display name."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this capacity."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional note about this capacity."},"memberCapacity":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Max distinct records a member can hold in the current window, or null for no limit."},"allocationExpirationPolicy":{"anyOf":[{"anyOf":[{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every hour.","enum":["hourly"]},"minute":{"description":"UTC minute the hourly window resets on, if using a fixed boundary.","type":"number"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every day.","enum":["daily"]},"time":{"description":"UTC time (HH:MM) the daily window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every week.","enum":["weekly"]},"weekDay":{"description":"Day of the week the weekly window resets (1 is Monday, 7 is Sunday).","type":"number"},"time":{"description":"UTC time (HH:MM) the weekly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every month.","enum":["monthly"]},"day":{"description":"Day of the month the monthly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the monthly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every quarter.","enum":["quarterly"]},"month":{"description":"Month within the quarter the window resets, if using a fixed boundary.","type":"number"},"day":{"description":"Day of the month the quarterly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the quarterly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every year.","enum":["yearly"]},"month":{"description":"Month of the year the window resets, if using a fixed boundary.","type":"number"},"day":{"description":"Day of the month the yearly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the yearly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false}]},{"type":"null"}],"description":"How the counting window resets, or null if allocations never expire."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Data model used to derive existing allocations, if this is a model-based capacity."},"idColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column used as the record identifier when reading from the model."},"timeColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date column used as the allocation timestamp when reading from the model."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Segmentation filter selecting which model rows count toward capacity."},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this capacity last synced allocations from its model."},"createdAt":{"description":"Time this capacity was created.","type":"string"},"updatedAt":{"description":"Time this capacity was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this capacity was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","color","description","memberCapacity","allocationExpirationPolicy","modelUuid","idColumnSlug","timeColumnSlug","filter","syncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Capacity","description":"Created capacity details."}},"required":["capacity"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/capacities/list":{"get":{"operationId":"getRevenueOrganizationCapacitiesList","summary":"List capacities","description":"List all capacities (GET /revenueOrganization/capacities/list).","tags":["Revenue Organization - Capacities"],"responses":{"200":{"description":"List capacities","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"capacities":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Capacity identifier."},"workspaceUuid":{"type":"string","description":"Workspace this capacity belongs to."},"name":{"type":"string","description":"Capacity display name."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this capacity."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional note about this capacity."},"memberCapacity":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Max distinct records a member can hold in the current window, or null for no limit."},"allocationExpirationPolicy":{"anyOf":[{"anyOf":[{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every hour.","enum":["hourly"]},"minute":{"description":"UTC minute the hourly window resets on, if using a fixed boundary.","type":"number"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every day.","enum":["daily"]},"time":{"description":"UTC time (HH:MM) the daily window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every week.","enum":["weekly"]},"weekDay":{"description":"Day of the week the weekly window resets (1 is Monday, 7 is Sunday).","type":"number"},"time":{"description":"UTC time (HH:MM) the weekly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every month.","enum":["monthly"]},"day":{"description":"Day of the month the monthly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the monthly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every quarter.","enum":["quarterly"]},"month":{"description":"Month within the quarter the window resets, if using a fixed boundary.","type":"number"},"day":{"description":"Day of the month the quarterly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the quarterly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every year.","enum":["yearly"]},"month":{"description":"Month of the year the window resets, if using a fixed boundary.","type":"number"},"day":{"description":"Day of the month the yearly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the yearly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false}]},{"type":"null"}],"description":"How the counting window resets, or null if allocations never expire."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Data model used to derive existing allocations, if this is a model-based capacity."},"idColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column used as the record identifier when reading from the model."},"timeColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date column used as the allocation timestamp when reading from the model."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Segmentation filter selecting which model rows count toward capacity."},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this capacity last synced allocations from its model."},"createdAt":{"description":"Time this capacity was created.","type":"string"},"updatedAt":{"description":"Time this capacity was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this capacity was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","color","description","memberCapacity","allocationExpirationPolicy","modelUuid","idColumnSlug","timeColumnSlug","filter","syncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"Capacities","description":"List of capacities."}},"required":["capacities"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/capacities/{uuid}":{"get":{"operationId":"getRevenueOrganizationCapacitiesByUuid","summary":"Get capacity","description":"Get a capacity by UUID (GET /revenueOrganization/capacities/{uuid}).","tags":["Revenue Organization - Capacities"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Capacity identifier."},"required":true,"description":"Capacity identifier."}],"responses":{"200":{"description":"Get capacity","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"capacity":{"type":"object","properties":{"uuid":{"type":"string","description":"Capacity identifier."},"workspaceUuid":{"type":"string","description":"Workspace this capacity belongs to."},"name":{"type":"string","description":"Capacity display name."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this capacity."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional note about this capacity."},"memberCapacity":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Max distinct records a member can hold in the current window, or null for no limit."},"allocationExpirationPolicy":{"anyOf":[{"anyOf":[{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every hour.","enum":["hourly"]},"minute":{"description":"UTC minute the hourly window resets on, if using a fixed boundary.","type":"number"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every day.","enum":["daily"]},"time":{"description":"UTC time (HH:MM) the daily window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every week.","enum":["weekly"]},"weekDay":{"description":"Day of the week the weekly window resets (1 is Monday, 7 is Sunday).","type":"number"},"time":{"description":"UTC time (HH:MM) the weekly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every month.","enum":["monthly"]},"day":{"description":"Day of the month the monthly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the monthly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every quarter.","enum":["quarterly"]},"month":{"description":"Month within the quarter the window resets, if using a fixed boundary.","type":"number"},"day":{"description":"Day of the month the quarterly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the quarterly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every year.","enum":["yearly"]},"month":{"description":"Month of the year the window resets, if using a fixed boundary.","type":"number"},"day":{"description":"Day of the month the yearly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the yearly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false}]},{"type":"null"}],"description":"How the counting window resets, or null if allocations never expire."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Data model used to derive existing allocations, if this is a model-based capacity."},"idColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column used as the record identifier when reading from the model."},"timeColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date column used as the allocation timestamp when reading from the model."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Segmentation filter selecting which model rows count toward capacity."},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this capacity last synced allocations from its model."},"createdAt":{"description":"Time this capacity was created.","type":"string"},"updatedAt":{"description":"Time this capacity was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this capacity was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","color","description","memberCapacity","allocationExpirationPolicy","modelUuid","idColumnSlug","timeColumnSlug","filter","syncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Capacity","description":"Capacity details."}},"required":["capacity"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putRevenueOrganizationCapacitiesByUuid","summary":"Update capacity","description":"Update a capacity (PUT /revenueOrganization/capacities/{uuid}).","tags":["Revenue Organization - Capacities"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Capacity identifier."},"required":true,"description":"Capacity identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Capacity name.","type":"string","minLength":1,"maxLength":255},"color":{"title":"Color","description":"Capacity color.","type":"string","enum":["orange","red","purple","green","yellow","grey"]},"description":{"title":"Description","description":"Capacity description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"memberCapacity":{"title":"Member capacity","description":"Capacity per member.","anyOf":[{"type":"number"},{"type":"null"}]},"allocationExpirationPolicy":{"title":"Allocation expiration policy","description":"Allocation expiration schedule.","anyOf":[{"anyOf":[{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["hourly"]},"minute":{"title":"Minute","description":"Minute of the hour.","type":"number"}},"required":["interval"]},{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["daily"]},"time":{"title":"Time","description":"Time of day.","type":"string"}},"required":["interval"]},{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["weekly"]},"weekDay":{"title":"Week day","description":"Day of the week.","type":"number"},"time":{"title":"Time","description":"Time of day.","type":"string"}},"required":["interval"]},{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["monthly"]},"day":{"title":"Day","description":"Day of the month.","type":"number"},"time":{"title":"Time","description":"Time of day.","type":"string"}},"required":["interval"]},{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["quarterly"]},"month":{"title":"Month","description":"Month of the quarter.","type":"number"},"day":{"title":"Day","description":"Day of the month.","type":"number"},"time":{"title":"Time","description":"Time of day.","type":"string"}},"required":["interval"]},{"type":"object","properties":{"interval":{"type":"string","title":"Interval","description":"Expiration interval.","enum":["yearly"]},"month":{"title":"Month","description":"Month of the year.","type":"number"},"day":{"title":"Day","description":"Day of the month.","type":"number"},"time":{"title":"Time","description":"Time of day.","type":"string"}},"required":["interval"]}]},{"type":"null"}]},"modelUuid":{"title":"Model UUID","description":"Model identifier for capacity mapping.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"idColumnSlug":{"title":"ID column slug","description":"Identifier column slug.","anyOf":[{"type":"string"},{"type":"null"}]},"timeColumnSlug":{"title":"Time column slug","description":"Time column slug.","anyOf":[{"type":"string"},{"type":"null"}]},"filter":{"title":"Filter","description":"Filter criteria for capacity.","anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"description":"String value, values, or expression to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"description":"Number or expression to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"description":"Lower bound of the inclusive range, or an expression."},"lastValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"description":"Value or expression to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"description":"Lower bound of the inclusive range, or an expression."},"otherValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"description":"Value or expression to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"description":"Lower bound of the inclusive range, or an expression."},"otherValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"description":"Value or expression to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"description":"Lower bound of the inclusive range, or an expression."},"otherValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"description":"Date or expression to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"description":"Lower bound of the inclusive range, or an expression."},"lastValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"description":"Occurrence count or expression to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"description":"String value, values, or expression to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"description":"Number or expression to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"description":"Lower bound of the inclusive range, or an expression."},"lastValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"description":"Value or expression to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"description":"Lower bound of the inclusive range, or an expression."},"otherValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"description":"Value or expression to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"description":"Lower bound of the inclusive range, or an expression."},"otherValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"description":"Date or expression to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"description":"Lower bound of the inclusive range, or an expression."},"lastValue":{"description":"Upper bound of the inclusive range, or an expression."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"description":"Enrollment event count or expression to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update capacity","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"capacity":{"type":"object","properties":{"uuid":{"type":"string","description":"Capacity identifier."},"workspaceUuid":{"type":"string","description":"Workspace this capacity belongs to."},"name":{"type":"string","description":"Capacity display name."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this capacity."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional note about this capacity."},"memberCapacity":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Max distinct records a member can hold in the current window, or null for no limit."},"allocationExpirationPolicy":{"anyOf":[{"anyOf":[{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every hour.","enum":["hourly"]},"minute":{"description":"UTC minute the hourly window resets on, if using a fixed boundary.","type":"number"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every day.","enum":["daily"]},"time":{"description":"UTC time (HH:MM) the daily window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every week.","enum":["weekly"]},"weekDay":{"description":"Day of the week the weekly window resets (1 is Monday, 7 is Sunday).","type":"number"},"time":{"description":"UTC time (HH:MM) the weekly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every month.","enum":["monthly"]},"day":{"description":"Day of the month the monthly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the monthly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every quarter.","enum":["quarterly"]},"month":{"description":"Month within the quarter the window resets, if using a fixed boundary.","type":"number"},"day":{"description":"Day of the month the quarterly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the quarterly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false},{"type":"object","properties":{"interval":{"type":"string","description":"Capacity window resets every year.","enum":["yearly"]},"month":{"description":"Month of the year the window resets, if using a fixed boundary.","type":"number"},"day":{"description":"Day of the month the yearly window resets, if using a fixed boundary.","type":"number"},"time":{"description":"UTC time (HH:MM) the yearly window resets, if using a fixed boundary.","type":"string"}},"required":["interval"],"additionalProperties":false}]},{"type":"null"}],"description":"How the counting window resets, or null if allocations never expire."},"modelUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Data model used to derive existing allocations, if this is a model-based capacity."},"idColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column used as the record identifier when reading from the model."},"timeColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Date column used as the allocation timestamp when reading from the model."},"filter":{"anyOf":[{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false},{"type":"null"}],"description":"Segmentation filter selecting which model rows count toward capacity."},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this capacity last synced allocations from its model."},"createdAt":{"description":"Time this capacity was created.","type":"string"},"updatedAt":{"description":"Time this capacity was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this capacity was deleted, if it has been."}},"required":["uuid","workspaceUuid","name","color","description","memberCapacity","allocationExpirationPolicy","modelUuid","idColumnSlug","timeColumnSlug","filter","syncedAt","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Capacity","description":"Updated capacity details."}},"required":["capacity"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteRevenueOrganizationCapacitiesByUuid","summary":"Remove capacity","description":"Remove a capacity (DELETE /revenueOrganization/capacities/{uuid}).","tags":["Revenue Organization - Capacities"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Capacity identifier."},"required":true,"description":"Capacity identifier."}],"responses":{"200":{"description":"Remove capacity","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/members/list":{"get":{"operationId":"getRevenueOrganizationMembersList","summary":"List members","description":"List all members (GET /revenueOrganization/members/list).","tags":["Revenue Organization - Members"],"responses":{"200":{"description":"List members","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Member identifier."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member first name, if set."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member last name, if set."},"profileImage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the member's profile picture."},"email":{"type":"string","description":"Member email address."},"connectors":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Connector this member identity is synced from."},"userId":{"type":"string","description":"This member's user identifier in the connected system."}},"required":["uuid","userId"],"additionalProperties":false},"description":"Connected systems this member is synced from."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Custom attributes on this member, such as languages or region."},"workspaceUuid":{"type":"string","description":"Workspace this member belongs to."},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this member was archived, if they have been."},"createdAt":{"description":"Time this member was created.","type":"string"}},"required":["uuid","firstName","lastName","profileImage","email","connectors","meta","workspaceUuid","archivedAt","createdAt"],"additionalProperties":false},"title":"Members","description":"List of members."}},"required":["members"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/members/{uuid}":{"get":{"operationId":"getRevenueOrganizationMembersByUuid","summary":"Get member","description":"Get a member by UUID (GET /revenueOrganization/members/{uuid}).","tags":["Revenue Organization - Members"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Member identifier."},"required":true,"description":"Member identifier."}],"responses":{"200":{"description":"Get member","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"uuid":{"type":"string","description":"Member identifier."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member first name, if set."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member last name, if set."},"profileImage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the member's profile picture."},"email":{"type":"string","description":"Member email address."},"connectors":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Connector this member identity is synced from."},"userId":{"type":"string","description":"This member's user identifier in the connected system."}},"required":["uuid","userId"],"additionalProperties":false},"description":"Connected systems this member is synced from."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Custom attributes on this member, such as languages or region."},"workspaceUuid":{"type":"string","description":"Workspace this member belongs to."},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this member was archived, if they have been."},"createdAt":{"description":"Time this member was created.","type":"string"}},"required":["uuid","firstName","lastName","profileImage","email","connectors","meta","workspaceUuid","archivedAt","createdAt"],"additionalProperties":false,"title":"Member","description":"Member details."}},"required":["member"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putRevenueOrganizationMembersByUuid","summary":"Update member","description":"Update a member (PUT /revenueOrganization/members/{uuid}).","tags":["Revenue Organization - Members"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Member identifier."},"required":true,"description":"Member identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"title":"Meta","description":"Member metadata.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update member","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"uuid":{"type":"string","description":"Member identifier."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member first name, if set."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member last name, if set."},"profileImage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the member's profile picture."},"email":{"type":"string","description":"Member email address."},"connectors":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Connector this member identity is synced from."},"userId":{"type":"string","description":"This member's user identifier in the connected system."}},"required":["uuid","userId"],"additionalProperties":false},"description":"Connected systems this member is synced from."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Custom attributes on this member, such as languages or region."},"workspaceUuid":{"type":"string","description":"Workspace this member belongs to."},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this member was archived, if they have been."},"createdAt":{"description":"Time this member was created.","type":"string"}},"required":["uuid","firstName","lastName","profileImage","email","connectors","meta","workspaceUuid","archivedAt","createdAt"],"additionalProperties":false,"title":"Member","description":"Updated member details."}},"required":["member"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/members/sync":{"post":{"operationId":"postRevenueOrganizationMembersSync","summary":"Sync members","description":"Sync members from external source (POST /revenueOrganization/members/sync).","tags":["Revenue Organization - Members"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorUuid":{"title":"Connector UUID","description":"Connector identifier to sync.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Sync members","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/members/{uuid}/archive":{"post":{"operationId":"postRevenueOrganizationMembersByUuidArchive","summary":"Archive member","description":"Archive a member (POST /revenueOrganization/members/{uuid}/archive).","tags":["Revenue Organization - Members"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Member identifier."},"required":true,"description":"Member identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Archive member","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/members/{uuid}/unarchive":{"post":{"operationId":"postRevenueOrganizationMembersByUuidUnarchive","summary":"Unarchive member","description":"Unarchive a member (POST /revenueOrganization/members/{uuid}/unarchive).","tags":["Revenue Organization - Members"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Member identifier."},"required":true,"description":"Member identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Unarchive member","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/territories":{"post":{"operationId":"postRevenueOrganizationTerritories","summary":"Create territory","description":"Create a new territory (POST /revenueOrganization/territories).","tags":["Revenue Organization - Territories"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":255,"title":"Label","description":"Territory label."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"title":"Color","description":"Territory color."},"description":{"title":"Description","description":"Territory description.","type":"string","minLength":1,"maxLength":1000},"members":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Member included in this territory."},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Round-robin weight for this member, or null for the default."}},"required":["uuid","weight"]},"title":"Members","description":"Territory members."},"fallbackMemberUuid":{"title":"Fallback member UUID","description":"Fallback member identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["label","color","members"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create territory","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"territory":{"type":"object","properties":{"uuid":{"type":"string","description":"Territory identifier."},"workspaceUuid":{"type":"string","description":"Workspace this territory belongs to."},"label":{"type":"string","description":"Territory display name."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this territory."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional note about this territory."},"members":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Member included in this territory."},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Round-robin weight for this member, or null for the default."}},"required":["uuid","weight"],"additionalProperties":false},"description":"Members in this territory and their round-robin weights."},"fallbackMemberUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member who receives the lead when no one in the pool is available."},"createdAt":{"description":"Time this territory was created.","type":"string"},"updatedAt":{"description":"Time this territory was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this territory was deleted, if it has been."}},"required":["uuid","workspaceUuid","label","color","description","members","fallbackMemberUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Territory","description":"Created territory details."}},"required":["territory"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/territories/list":{"get":{"operationId":"getRevenueOrganizationTerritoriesList","summary":"List territories","description":"List all territories (GET /revenueOrganization/territories/list).","tags":["Revenue Organization - Territories"],"responses":{"200":{"description":"List territories","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"territories":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Territory identifier."},"workspaceUuid":{"type":"string","description":"Workspace this territory belongs to."},"label":{"type":"string","description":"Territory display name."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this territory."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional note about this territory."},"members":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Member included in this territory."},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Round-robin weight for this member, or null for the default."}},"required":["uuid","weight"],"additionalProperties":false},"description":"Members in this territory and their round-robin weights."},"fallbackMemberUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member who receives the lead when no one in the pool is available."},"createdAt":{"description":"Time this territory was created.","type":"string"},"updatedAt":{"description":"Time this territory was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this territory was deleted, if it has been."}},"required":["uuid","workspaceUuid","label","color","description","members","fallbackMemberUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"Territories","description":"List of territories."}},"required":["territories"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/revenueOrganization/territories/{uuid}":{"get":{"operationId":"getRevenueOrganizationTerritoriesByUuid","summary":"Get territory","description":"Get a territory by UUID (GET /revenueOrganization/territories/{uuid}).","tags":["Revenue Organization - Territories"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Territory identifier."},"required":true,"description":"Territory identifier."}],"responses":{"200":{"description":"Get territory","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"territory":{"type":"object","properties":{"uuid":{"type":"string","description":"Territory identifier."},"workspaceUuid":{"type":"string","description":"Workspace this territory belongs to."},"label":{"type":"string","description":"Territory display name."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this territory."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional note about this territory."},"members":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Member included in this territory."},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Round-robin weight for this member, or null for the default."}},"required":["uuid","weight"],"additionalProperties":false},"description":"Members in this territory and their round-robin weights."},"fallbackMemberUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member who receives the lead when no one in the pool is available."},"createdAt":{"description":"Time this territory was created.","type":"string"},"updatedAt":{"description":"Time this territory was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this territory was deleted, if it has been."}},"required":["uuid","workspaceUuid","label","color","description","members","fallbackMemberUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Territory","description":"Territory details."}},"required":["territory"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putRevenueOrganizationTerritoriesByUuid","summary":"Update territory","description":"Update a territory (PUT /revenueOrganization/territories/{uuid}).","tags":["Revenue Organization - Territories"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Territory identifier."},"required":true,"description":"Territory identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"title":"Label","description":"Territory label.","type":"string","minLength":1,"maxLength":255},"color":{"title":"Color","description":"Territory color.","type":"string","enum":["orange","red","purple","green","yellow","grey"]},"description":{"title":"Description","description":"Territory description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"members":{"title":"Members","description":"Territory members.","type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Member included in this territory."},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Round-robin weight for this member, or null for the default."}},"required":["uuid","weight"]}},"fallbackMemberUuid":{"title":"Fallback member UUID","description":"Fallback member identifier.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update territory","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"territory":{"type":"object","properties":{"uuid":{"type":"string","description":"Territory identifier."},"workspaceUuid":{"type":"string","description":"Workspace this territory belongs to."},"label":{"type":"string","description":"Territory display name."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this territory."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional note about this territory."},"members":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Member included in this territory."},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Round-robin weight for this member, or null for the default."}},"required":["uuid","weight"],"additionalProperties":false},"description":"Members in this territory and their round-robin weights."},"fallbackMemberUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Member who receives the lead when no one in the pool is available."},"createdAt":{"description":"Time this territory was created.","type":"string"},"updatedAt":{"description":"Time this territory was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this territory was deleted, if it has been."}},"required":["uuid","workspaceUuid","label","color","description","members","fallbackMemberUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"Territory","description":"Updated territory details."}},"required":["territory"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteRevenueOrganizationTerritoriesByUuid","summary":"Remove territory","description":"Remove a territory (DELETE /revenueOrganization/territories/{uuid}).","tags":["Revenue Organization - Territories"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Territory identifier."},"required":true,"description":"Territory identifier."}],"responses":{"200":{"description":"Remove territory","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/changes/list":{"get":{"operationId":"getSegmentationChangesList","summary":"List changes","description":"List all segment changes (GET /segmentation/changes/list).","tags":["Segmentation - Changes"],"parameters":[{"in":"query","name":"segmentUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Segment UUID","description":"Segment identifier."},"required":true,"description":"Segment identifier."},{"in":"query","name":"hasRecords","schema":{"title":"Has records","description":"Filter changes by record kind.","type":"string","enum":["added","updated","removed"]},"description":"Filter changes by record kind."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of changes to return.","type":"string"},"description":"Maximum number of changes to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of changes to skip.","type":"string"},"description":"Number of changes to skip."}],"responses":{"200":{"description":"List changes","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Change snapshot identifier."},"workspaceUuid":{"type":"string","description":"Workspace this change snapshot belongs to."},"segmentUuid":{"type":"string","description":"Segment this change snapshot belongs to."},"slug":{"type":"string","description":"Change snapshot slug."},"totalRecordsCount":{"type":"number","description":"Total records in the segment at this snapshot."},"updatedRecordsCount":{"type":"number","description":"Records updated since the previous snapshot."},"removedRecordsCount":{"type":"number","description":"Records removed since the previous snapshot."},"addedRecordsCount":{"type":"number","description":"Records added since the previous snapshot."},"unchangedRecordsCount":{"type":"number","description":"Records unchanged since the previous snapshot."},"createdAt":{"description":"Time this change snapshot was created.","type":"string"}},"required":["uuid","workspaceUuid","segmentUuid","slug","totalRecordsCount","updatedRecordsCount","removedRecordsCount","addedRecordsCount","unchangedRecordsCount","createdAt"],"additionalProperties":false},"title":"Changes","description":"List of changes."}},"required":["changes"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/changes/{uuid}":{"get":{"operationId":"getSegmentationChangesByUuid","summary":"Get change","description":"Get a segment change by UUID (GET /segmentation/changes/{uuid}).","tags":["Segmentation - Changes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Change identifier."},"required":true,"description":"Change identifier."}],"responses":{"200":{"description":"Get change","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"change":{"type":"object","properties":{"uuid":{"type":"string","description":"Change snapshot identifier."},"workspaceUuid":{"type":"string","description":"Workspace this change snapshot belongs to."},"segmentUuid":{"type":"string","description":"Segment this change snapshot belongs to."},"slug":{"type":"string","description":"Change snapshot slug."},"totalRecordsCount":{"type":"number","description":"Total records in the segment at this snapshot."},"updatedRecordsCount":{"type":"number","description":"Records updated since the previous snapshot."},"removedRecordsCount":{"type":"number","description":"Records removed since the previous snapshot."},"addedRecordsCount":{"type":"number","description":"Records added since the previous snapshot."},"unchangedRecordsCount":{"type":"number","description":"Records unchanged since the previous snapshot."},"createdAt":{"description":"Time this change snapshot was created.","type":"string"}},"required":["uuid","workspaceUuid","segmentUuid","slug","totalRecordsCount","updatedRecordsCount","removedRecordsCount","addedRecordsCount","unchangedRecordsCount","createdAt"],"additionalProperties":false,"title":"Change","description":"Change details."}},"required":["change"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/changes/{uuid}/fetch":{"post":{"operationId":"postSegmentationChangesByUuidFetch","summary":"Fetch change data","description":"Fetch data for a segment change (POST /segmentation/changes/{uuid}/fetch).","tags":["Segmentation - Changes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Change identifier."},"required":true,"description":"Change identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kinds":{"type":"array","items":{"type":"string","enum":["added","updated","removed","unchanged"]},"title":"Kinds","description":"Change kinds to include."},"limit":{"title":"Limit","description":"Maximum number of records to return.","type":"number"},"offset":{"title":"Offset","description":"Number of records to skip.","type":"number"}},"required":["kinds"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Fetch change data","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","vector","any"],"description":"Runtime type of the column values."},"label":{"type":"string","description":"Column display name."},"modelUuid":{"type":"string","description":"Model this column belongs to."}},"required":["slug","type","label","modelUuid"],"additionalProperties":false},"title":"Columns","description":"Segment columns."},"count":{"type":"number","title":"Count","description":"Total number of records."},"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Fetched change records."}},"required":["columns","count","records"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/changes/{uuid}/download":{"post":{"operationId":"postSegmentationChangesByUuidDownload","summary":"Download change data","description":"Download data for a segment change (POST /segmentation/changes/{uuid}/download).","tags":["Segmentation - Changes"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Change identifier."},"required":true,"description":"Change identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kinds":{"type":"array","items":{"type":"string","enum":["added","updated","removed"]},"title":"Kinds","description":"Change kinds to include."}},"required":["kinds"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Download change data","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"},"title":"URLs","description":"Download URLs for change records."}},"required":["urls"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/records/fetch":{"post":{"operationId":"postSegmentationRecordsFetch","summary":"Fetch records","description":"Fetch segmentation records (POST /segmentation/records/fetch).","tags":["Segmentation - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"resetCache":{"title":"Reset cache","description":"Whether to reset the cache before fetching.","type":"boolean"},"ids":{"type":"array","items":{"type":"string"},"title":"IDs","description":"Record identifiers to fetch."}},"required":["modelUuid","ids"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Fetch records","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Fetched records."}},"required":["records"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/segments":{"post":{"operationId":"postSegmentationSegments","summary":"Create segment","description":"Create a new segment (POST /segmentation/segments).","tags":["Segmentation - Segments"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Segment name."},"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"filter":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"title":"Filter","description":"Segment filter criteria."},"sort":{"title":"Sort","description":"Sort criteria for the segment.","type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"]}},"limit":{"title":"Limit","description":"Maximum number of records in the segment.","type":"number"},"trackingColumnSlugs":{"title":"Tracking column slugs","description":"Tracking column identifiers.","type":"array","items":{"type":"string"}},"columnSlugs":{"title":"Column slugs","description":"Identifiers of the columns displayed for the segment.","type":"array","items":{"type":"string"}}},"required":["name","modelUuid","filter"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create segment","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"segment":{"type":"object","properties":{"uuid":{"type":"string","description":"Segment identifier."},"workspaceUuid":{"type":"string","description":"Workspace this segment belongs to."},"userUuid":{"type":"string","description":"User who created this segment."},"modelUuid":{"type":"string","description":"Model this segment filters."},"slug":{"type":"string","description":"Segment slug."},"name":{"type":"string","description":"Segment display name."},"filter":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false,"description":"Which records this segment includes."},"sort":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"],"additionalProperties":false}},{"type":"null"}],"description":"Sort order applied to the segment view, if any."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records in the segment view, if capped."},"recordsCount":{"type":"number","description":"Number of records currently matching this segment."},"fromPlay":{"type":"boolean","description":"Whether this segment was created by a play."},"trackingColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns whose changes feed this segment's change feed, if limited."},"columnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns this segment exposes, if limited."},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this segment was last synced, if it has been."},"createdAt":{"description":"Time this segment was created.","type":"string"},"updatedAt":{"description":"Time this segment was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this segment was deleted, if it has been."},"lastChange":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Most recent change snapshot identifier."},"slug":{"type":"string","description":"Slug of the most recent change snapshot."},"totalRecordsCount":{"type":"number","description":"Total records in the segment at this snapshot."},"updatedRecordsCount":{"type":"number","description":"Records updated since the previous snapshot."},"removedRecordsCount":{"type":"number","description":"Records removed since the previous snapshot."},"addedRecordsCount":{"type":"number","description":"Records added since the previous snapshot."},"unchangedRecordsCount":{"type":"number","description":"Records unchanged since the previous snapshot."},"createdAt":{"description":"Time the most recent change snapshot was created.","type":"string"}},"required":["uuid","slug","totalRecordsCount","updatedRecordsCount","removedRecordsCount","addedRecordsCount","unchangedRecordsCount","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent change snapshot for this segment, if any."}},"required":["uuid","workspaceUuid","userUuid","modelUuid","slug","name","filter","sort","limit","recordsCount","fromPlay","trackingColumnSlugs","columnSlugs","syncedAt","createdAt","updatedAt","deletedAt","lastChange"],"additionalProperties":false,"title":"Segment","description":"Created segment details."}},"required":["segment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/segments/list":{"get":{"operationId":"getSegmentationSegmentsList","summary":"List segments","description":"List all segments (GET /segmentation/segments/list).","tags":["Segmentation - Segments"],"parameters":[{"in":"query","name":"modelUuid","schema":{"title":"Model UUID","description":"Filter segments by model identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter segments by model identifier."}],"responses":{"200":{"description":"List segments","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"segments":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Segment identifier."},"workspaceUuid":{"type":"string","description":"Workspace this segment belongs to."},"userUuid":{"type":"string","description":"User who created this segment."},"modelUuid":{"type":"string","description":"Model this segment filters."},"slug":{"type":"string","description":"Segment slug."},"name":{"type":"string","description":"Segment display name."},"filter":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false,"description":"Which records this segment includes."},"sort":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"],"additionalProperties":false}},{"type":"null"}],"description":"Sort order applied to the segment view, if any."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records in the segment view, if capped."},"recordsCount":{"type":"number","description":"Number of records currently matching this segment."},"fromPlay":{"type":"boolean","description":"Whether this segment was created by a play."},"trackingColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns whose changes feed this segment's change feed, if limited."},"columnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns this segment exposes, if limited."},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this segment was last synced, if it has been."},"createdAt":{"description":"Time this segment was created.","type":"string"},"updatedAt":{"description":"Time this segment was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this segment was deleted, if it has been."},"lastChange":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Most recent change snapshot identifier."},"slug":{"type":"string","description":"Slug of the most recent change snapshot."},"totalRecordsCount":{"type":"number","description":"Total records in the segment at this snapshot."},"updatedRecordsCount":{"type":"number","description":"Records updated since the previous snapshot."},"removedRecordsCount":{"type":"number","description":"Records removed since the previous snapshot."},"addedRecordsCount":{"type":"number","description":"Records added since the previous snapshot."},"unchangedRecordsCount":{"type":"number","description":"Records unchanged since the previous snapshot."},"createdAt":{"description":"Time the most recent change snapshot was created.","type":"string"}},"required":["uuid","slug","totalRecordsCount","updatedRecordsCount","removedRecordsCount","addedRecordsCount","unchangedRecordsCount","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent change snapshot for this segment, if any."}},"required":["uuid","workspaceUuid","userUuid","modelUuid","slug","name","filter","sort","limit","recordsCount","fromPlay","trackingColumnSlugs","columnSlugs","syncedAt","createdAt","updatedAt","deletedAt","lastChange"],"additionalProperties":false},"title":"Segments","description":"List of segments."}},"required":["segments"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/segments/{uuid}":{"get":{"operationId":"getSegmentationSegmentsByUuid","summary":"Get segment","description":"Get a segment by UUID (GET /segmentation/segments/{uuid}).","tags":["Segmentation - Segments"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Segment identifier."},"required":true,"description":"Segment identifier."}],"responses":{"200":{"description":"Get segment","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"segment":{"type":"object","properties":{"uuid":{"type":"string","description":"Segment identifier."},"workspaceUuid":{"type":"string","description":"Workspace this segment belongs to."},"userUuid":{"type":"string","description":"User who created this segment."},"modelUuid":{"type":"string","description":"Model this segment filters."},"slug":{"type":"string","description":"Segment slug."},"name":{"type":"string","description":"Segment display name."},"filter":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false,"description":"Which records this segment includes."},"sort":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"],"additionalProperties":false}},{"type":"null"}],"description":"Sort order applied to the segment view, if any."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records in the segment view, if capped."},"recordsCount":{"type":"number","description":"Number of records currently matching this segment."},"fromPlay":{"type":"boolean","description":"Whether this segment was created by a play."},"trackingColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns whose changes feed this segment's change feed, if limited."},"columnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns this segment exposes, if limited."},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this segment was last synced, if it has been."},"createdAt":{"description":"Time this segment was created.","type":"string"},"updatedAt":{"description":"Time this segment was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this segment was deleted, if it has been."},"lastChange":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Most recent change snapshot identifier."},"slug":{"type":"string","description":"Slug of the most recent change snapshot."},"totalRecordsCount":{"type":"number","description":"Total records in the segment at this snapshot."},"updatedRecordsCount":{"type":"number","description":"Records updated since the previous snapshot."},"removedRecordsCount":{"type":"number","description":"Records removed since the previous snapshot."},"addedRecordsCount":{"type":"number","description":"Records added since the previous snapshot."},"unchangedRecordsCount":{"type":"number","description":"Records unchanged since the previous snapshot."},"createdAt":{"description":"Time the most recent change snapshot was created.","type":"string"}},"required":["uuid","slug","totalRecordsCount","updatedRecordsCount","removedRecordsCount","addedRecordsCount","unchangedRecordsCount","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent change snapshot for this segment, if any."}},"required":["uuid","workspaceUuid","userUuid","modelUuid","slug","name","filter","sort","limit","recordsCount","fromPlay","trackingColumnSlugs","columnSlugs","syncedAt","createdAt","updatedAt","deletedAt","lastChange"],"additionalProperties":false,"title":"Segment","description":"Segment details."}},"required":["segment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putSegmentationSegmentsByUuid","summary":"Update segment","description":"Update a segment (PUT /segmentation/segments/{uuid}).","tags":["Segmentation - Segments"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Segment identifier."},"required":true,"description":"Segment identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Segment name.","type":"string","minLength":1,"maxLength":255},"filter":{"title":"Filter","description":"Segment filter criteria.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]},"sort":{"title":"Sort","description":"Sort criteria for the segment.","anyOf":[{"type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"]}},{"type":"null"}]},"limit":{"title":"Limit","description":"Maximum number of records in the segment.","anyOf":[{"type":"number"},{"type":"null"}]},"trackingColumnSlugs":{"title":"Tracking column slugs","description":"Tracking column identifiers.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"columnSlugs":{"title":"Column slugs","description":"Identifiers of the columns displayed for the segment.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update segment","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"segment":{"type":"object","properties":{"uuid":{"type":"string","description":"Segment identifier."},"workspaceUuid":{"type":"string","description":"Workspace this segment belongs to."},"userUuid":{"type":"string","description":"User who created this segment."},"modelUuid":{"type":"string","description":"Model this segment filters."},"slug":{"type":"string","description":"Segment slug."},"name":{"type":"string","description":"Segment display name."},"filter":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false,"description":"Which records this segment includes."},"sort":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"],"additionalProperties":false}},{"type":"null"}],"description":"Sort order applied to the segment view, if any."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Maximum number of records in the segment view, if capped."},"recordsCount":{"type":"number","description":"Number of records currently matching this segment."},"fromPlay":{"type":"boolean","description":"Whether this segment was created by a play."},"trackingColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns whose changes feed this segment's change feed, if limited."},"columnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns this segment exposes, if limited."},"syncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this segment was last synced, if it has been."},"createdAt":{"description":"Time this segment was created.","type":"string"},"updatedAt":{"description":"Time this segment was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this segment was deleted, if it has been."},"lastChange":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Most recent change snapshot identifier."},"slug":{"type":"string","description":"Slug of the most recent change snapshot."},"totalRecordsCount":{"type":"number","description":"Total records in the segment at this snapshot."},"updatedRecordsCount":{"type":"number","description":"Records updated since the previous snapshot."},"removedRecordsCount":{"type":"number","description":"Records removed since the previous snapshot."},"addedRecordsCount":{"type":"number","description":"Records added since the previous snapshot."},"unchangedRecordsCount":{"type":"number","description":"Records unchanged since the previous snapshot."},"createdAt":{"description":"Time the most recent change snapshot was created.","type":"string"}},"required":["uuid","slug","totalRecordsCount","updatedRecordsCount","removedRecordsCount","addedRecordsCount","unchangedRecordsCount","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent change snapshot for this segment, if any."}},"required":["uuid","workspaceUuid","userUuid","modelUuid","slug","name","filter","sort","limit","recordsCount","fromPlay","trackingColumnSlugs","columnSlugs","syncedAt","createdAt","updatedAt","deletedAt","lastChange"],"additionalProperties":false,"title":"Segment","description":"Updated segment details."}},"required":["segment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteSegmentationSegmentsByUuid","summary":"Remove segment","description":"Remove a segment (DELETE /segmentation/segments/{uuid}).","tags":["Segmentation - Segments"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Segment identifier."},"required":true,"description":"Segment identifier."}],"responses":{"200":{"description":"Remove segment","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/segments/fetch":{"post":{"operationId":"postSegmentationSegmentsFetch","summary":"Fetch segment data","description":"Fetch data for a segment (POST /segmentation/segments/fetch).","tags":["Segmentation - Segments"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"filter":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"title":"Filter","description":"Segment filter criteria."},"sort":{"title":"Sort","description":"Sort criteria for the segment.","type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"]}},"limit":{"title":"Limit","description":"Maximum number of records to include.","type":"number"},"fetchingLimit":{"title":"Fetching limit","description":"Number of records to fetch per batch.","type":"number"},"fetchingOffset":{"title":"Fetching offset","description":"Offset for fetching records.","type":"number"},"enrich":{"title":"Enrich","description":"Whether to enrich records with segment membership (adds a `_segments` column).","type":"boolean"},"sync":{"title":"Sync","description":"Whether to sync before fetching.","type":"boolean"}},"required":["modelUuid","filter"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Fetch segment data","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Fetched segment records."},"columns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","vector","any"],"description":"Runtime type of the column values."},"label":{"type":"string","description":"Column display name."},"modelUuid":{"type":"string","description":"Model this column belongs to."}},"required":["slug","type","label","modelUuid"],"additionalProperties":false},"title":"Columns","description":"Segment columns."},"count":{"type":"number","title":"Count","description":"Total number of records."},"isRefreshing":{"type":"boolean","title":"Is refreshing","description":"Whether a model refresh was still running, so very recent writes may be missing. Fetch again shortly for fresher data."}},"required":["records","columns","count","isRefreshing"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/segments/download":{"post":{"operationId":"postSegmentationSegmentsDownload","summary":"Download segment data","description":"Download data for a segment (POST /segmentation/segments/download).","tags":["Segmentation - Segments"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"filter":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"title":"Filter","description":"Segment filter criteria."},"sort":{"title":"Sort","description":"Sort criteria for the segment.","type":"array","items":{"type":"object","properties":{"columnSlug":{"type":"string","description":"Column to order by."},"kind":{"type":"string","enum":["asc","desc"],"description":"Sort direction for this column."}},"required":["columnSlug","kind"]}},"limit":{"title":"Limit","description":"Maximum number of records to download.","type":"number"}},"required":["modelUuid","filter"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Download segment data","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"},"title":"URLs","description":"Download URLs for segment records."}},"required":["urls"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/segmentation/segments/{uuid}/metrics":{"get":{"operationId":"getSegmentationSegmentsByUuidMetrics","summary":"Get segment metrics","description":"Get metrics for a segment (GET /segmentation/segments/{uuid}/metrics).","tags":["Segmentation - Segments"],"parameters":[{"in":"query","name":"from","schema":{"type":"string","title":"From","description":"Start of the time range."},"required":true,"description":"Start of the time range."},{"in":"query","name":"to","schema":{"type":"string","title":"To","description":"End of the time range."},"required":true,"description":"End of the time range."},{"in":"query","name":"unit","schema":{"type":"string","enum":["day","week","month","year"],"title":"Unit","description":"Time unit for aggregation."},"required":true,"description":"Time unit for aggregation."},{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Segment identifier."},"required":true,"description":"Segment identifier."}],"responses":{"200":{"description":"Get segment metrics","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"segmentMetrics":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Day these segment metrics were computed for."},"totalRecordsCount":{"type":"number","description":"Total records in the segment on this day."},"addedRecordsCount":{"type":"number","description":"Records added to the segment on this day."},"updatedRecordsCount":{"type":"number","description":"Records updated in the segment on this day."},"removedRecordsCount":{"type":"number","description":"Records removed from the segment on this day."},"unchangedRecordsCount":{"type":"number","description":"Records unchanged in the segment on this day."}},"required":["date","totalRecordsCount","addedRecordsCount","updatedRecordsCount","removedRecordsCount","unchangedRecordsCount"],"additionalProperties":false},"title":"Segment metrics","description":"Segment metrics for the selected range."}},"required":["segmentMetrics"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/columns":{"post":{"operationId":"postStorageColumns","summary":"Create column","description":"Create a new column for a model (POST /storage/columns).","tags":["Storage - Columns"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"column":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Workspace-owned column stored on the model.","enum":["custom"]}},"required":["slug","type","label","kind"]},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column computed from an expression over other columns.","enum":["computed"]},"expression":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"expression":{"type":"string","description":"Expression source to evaluate."}},"required":["kind","instructTo","expression"]},{"anyOf":[{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is not based on a recipe.","enum":[false]}},"required":["fromRecipe"]},{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is based on a recipe.","enum":[true]},"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"version":{"type":"number","description":"Recipe version this expression uses."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values bound to each recipe placeholder."}},"required":["uuid","version","variables"],"description":"Recipe this expression was created from."}},"required":["fromRecipe","recipe"]}]}],"description":"Expression that computes this column's value."},"columnsUsed":{"description":"Column slugs the expression reads, if known.","type":"array","items":{"type":"string"}}},"required":["slug","type","label","kind","expression"]},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column aggregated across a related model.","enum":["metric"]},"relationshipUuid":{"type":"string","description":"Relationship this metric aggregates across."},"aggregation":{"type":"object","properties":{"function":{"type":"string","enum":["AVG","COUNT","MAX","MIN","SUM"],"description":"Aggregation applied to the related column."},"columnSlug":{"type":"string","description":"Related column the aggregation is applied to."}},"required":["function","columnSlug"],"description":"How related rows are aggregated into this column."},"filter":{"description":"Filter restricting which related rows are aggregated.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]}},"required":["slug","type","label","kind","relationshipUuid","aggregation"]},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column looked up from a joined model.","enum":["lookup"]},"join":{"type":"object","properties":{"toModelUuid":{"type":"string","description":"Model this lookup joins to."},"fromColumnSlug":{"type":"string","description":"Column on this model used as the join key."},"toColumnSlug":{"type":"string","description":"Column on the joined model used as the join key."}},"required":["toModelUuid","fromColumnSlug","toColumnSlug"],"description":"Join used to resolve the looked-up value."},"extractColumnSlug":{"type":"string","description":"Column pulled from the joined model."},"filter":{"description":"Filter restricting which joined rows are considered.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]}},"required":["slug","type","label","kind","join","extractColumnSlug"]}],"title":"Column","description":"Additional column definition.","type":"object"}},"required":["modelUuid","column"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create column","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteStorageColumns","summary":"Remove column","description":"Remove a column by UUID (DELETE /storage/columns).","tags":["Storage - Columns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"columnSlug":{"type":"string","title":"Column slug","description":"Column slug to remove."}},"required":["modelUuid","columnSlug"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Remove column","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putStorageColumns","summary":"Update column","description":"Update a column by UUID (PUT /storage/columns).","tags":["Storage - Columns"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"column":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column synced from the model's source extractor.","enum":["original"]},"originalSlug":{"type":"string","description":"Source column slug before any aliasing."}},"required":["slug","type","label","kind","originalSlug"]},{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Workspace-owned column stored on the model.","enum":["custom"]}},"required":["slug","type","label","kind"]},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column computed from an expression over other columns.","enum":["computed"]},"expression":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"expression":{"type":"string","description":"Expression source to evaluate."}},"required":["kind","instructTo","expression"]},{"anyOf":[{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is not based on a recipe.","enum":[false]}},"required":["fromRecipe"]},{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is based on a recipe.","enum":[true]},"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"version":{"type":"number","description":"Recipe version this expression uses."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values bound to each recipe placeholder."}},"required":["uuid","version","variables"],"description":"Recipe this expression was created from."}},"required":["fromRecipe","recipe"]}]}],"description":"Expression that computes this column's value."},"columnsUsed":{"description":"Column slugs the expression reads, if known.","type":"array","items":{"type":"string"}}},"required":["slug","type","label","kind","expression"]},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column aggregated across a related model.","enum":["metric"]},"relationshipUuid":{"type":"string","description":"Relationship this metric aggregates across."},"aggregation":{"type":"object","properties":{"function":{"type":"string","enum":["AVG","COUNT","MAX","MIN","SUM"],"description":"Aggregation applied to the related column."},"columnSlug":{"type":"string","description":"Related column the aggregation is applied to."}},"required":["function","columnSlug"],"description":"How related rows are aggregated into this column."},"filter":{"description":"Filter restricting which related rows are aggregated.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]}},"required":["slug","type","label","kind","relationshipUuid","aggregation"]},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column looked up from a joined model.","enum":["lookup"]},"join":{"type":"object","properties":{"toModelUuid":{"type":"string","description":"Model this lookup joins to."},"fromColumnSlug":{"type":"string","description":"Column on this model used as the join key."},"toColumnSlug":{"type":"string","description":"Column on the joined model used as the join key."}},"required":["toModelUuid","fromColumnSlug","toColumnSlug"],"description":"Join used to resolve the looked-up value."},"extractColumnSlug":{"type":"string","description":"Column pulled from the joined model."},"filter":{"description":"Filter restricting which joined rows are considered.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]}},"required":["slug","type","label","kind","join","extractColumnSlug"]}],"type":"object"}],"title":"Column","description":"Updated column definition.","type":"object"}},"required":["modelUuid","column"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update column","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/columns/list":{"get":{"operationId":"getStorageColumnsList","summary":"List model columns","description":"List all columns for a model, using prefixed slugs for additional columns (GET /storage/columns/list).","tags":["Storage - Columns"],"parameters":[{"in":"query","name":"modelUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"required":true,"description":"Model identifier."}],"responses":{"200":{"description":"List model columns","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"},"title":"Columns","description":"List of model columns with storage prefixes applied."}},"required":["columns"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/columns/autocomplete":{"post":{"operationId":"postStorageColumnsAutocomplete","summary":"Autocomplete columns","description":"Get column autocomplete suggestions (POST /storage/columns/autocomplete).","tags":["Storage - Columns"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"column":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column synced from the model's source extractor.","enum":["original"]},"originalSlug":{"type":"string","description":"Source column slug before any aliasing."}},"required":["slug","type","label","kind","originalSlug"]},{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Workspace-owned column stored on the model.","enum":["custom"]}},"required":["slug","type","label","kind"]},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column computed from an expression over other columns.","enum":["computed"]},"expression":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"expression":{"type":"string","description":"Expression source to evaluate."}},"required":["kind","instructTo","expression"]},{"anyOf":[{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is not based on a recipe.","enum":[false]}},"required":["fromRecipe"]},{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is based on a recipe.","enum":[true]},"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"version":{"type":"number","description":"Recipe version this expression uses."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values bound to each recipe placeholder."}},"required":["uuid","version","variables"],"description":"Recipe this expression was created from."}},"required":["fromRecipe","recipe"]}]}],"description":"Expression that computes this column's value."},"columnsUsed":{"description":"Column slugs the expression reads, if known.","type":"array","items":{"type":"string"}}},"required":["slug","type","label","kind","expression"]},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column aggregated across a related model.","enum":["metric"]},"relationshipUuid":{"type":"string","description":"Relationship this metric aggregates across."},"aggregation":{"type":"object","properties":{"function":{"type":"string","enum":["AVG","COUNT","MAX","MIN","SUM"],"description":"Aggregation applied to the related column."},"columnSlug":{"type":"string","description":"Related column the aggregation is applied to."}},"required":["function","columnSlug"],"description":"How related rows are aggregated into this column."},"filter":{"description":"Filter restricting which related rows are aggregated.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]}},"required":["slug","type","label","kind","relationshipUuid","aggregation"]},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column looked up from a joined model.","enum":["lookup"]},"join":{"type":"object","properties":{"toModelUuid":{"type":"string","description":"Model this lookup joins to."},"fromColumnSlug":{"type":"string","description":"Column on this model used as the join key."},"toColumnSlug":{"type":"string","description":"Column on the joined model used as the join key."}},"required":["toModelUuid","fromColumnSlug","toColumnSlug"],"description":"Join used to resolve the looked-up value."},"extractColumnSlug":{"type":"string","description":"Column pulled from the joined model."},"filter":{"description":"Filter restricting which joined rows are considered.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]}},"required":["slug","type","label","kind","join","extractColumnSlug"]}],"type":"object"}],"title":"Column","description":"Column definition.","type":"object"},"query":{"title":"Query","description":"Search query to filter autocomplete results.","type":"string"}},"required":["modelUuid","column"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Autocomplete columns","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","title":"Outcome","description":"Autocomplete outcome.","enum":["autocompleted"]},"results":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","title":"Label","description":"Result label."},"value":{"type":"string","title":"Value","description":"Result value."}},"required":["label","value"],"additionalProperties":false},"title":"Results","description":"Autocomplete results."}},"required":["outcome","results"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/columns/existsBySlug":{"get":{"operationId":"getStorageColumnsExistsBySlug","summary":"Check column exists by slug","description":"Check if a column exists by its slug (GET /storage/columns/existsBySlug).","tags":["Storage - Columns"],"parameters":[{"in":"query","name":"modelUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"required":true,"description":"Model identifier."},{"in":"query","name":"slug","schema":{"type":"string","minLength":1,"maxLength":63,"title":"Slug","description":"Column slug to check."},"required":true,"description":"Column slug to check."}],"responses":{"200":{"description":"Check column exists by slug","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean","title":"Exists","description":"Whether the column exists."}},"required":["exists"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/columns/reorder":{"put":{"operationId":"putStorageColumnsReorder","summary":"Reorder columns","description":"Reorder columns for a model (PUT /storage/columns/reorder).","tags":["Storage - Columns"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"columnSlug":{"type":"string","title":"Column slug","description":"Column slug to reorder."},"toIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"title":"To index","description":"Target index for the column."}},"required":["modelUuid","columnSlug","toIndex"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Reorder columns","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/columns/insertCustomValues":{"post":{"operationId":"postStorageColumnsInsertCustomValues","summary":"Insert custom column values","description":"Set custom column values on a single record. Original object fields are not accepted; use record create/update for those. (POST /storage/columns/insertCustomValues).","tags":["Storage - Columns"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Target model."},"id":{"type":"string","minLength":1,"title":"Record ID","description":"Record identifier to write custom column values onto."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Custom column values","description":"Values keyed by custom column slug. Original object fields are not accepted."}},"required":["modelUuid","id","data"],"additionalProperties":false,"title":"Insert custom column values body","description":"Shape: { modelUuid, id, data } where data is custom column slugs to values."}}}},"responses":{"200":{"description":"Insert custom column values","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/columns/insertCustomValuesBulk":{"post":{"operationId":"postStorageColumnsInsertCustomValuesBulk","summary":"Insert custom column values (bulk)","description":"Set custom column values on multiple records. Original object fields are not accepted; use record create/update for those. (POST /storage/columns/insertCustomValuesBulk).","tags":["Storage - Columns"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Target model."},"records":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"title":"Record ID","description":"Record identifier to write custom column values onto."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Custom column values","description":"Values keyed by custom column slug. Original object fields are not accepted."}},"required":["id","data"],"additionalProperties":false,"title":"Record","description":"A single record's custom column values."},"title":"Records","description":"Records to update. Up to 1000 per request."}},"required":["modelUuid","records"],"additionalProperties":false,"title":"Insert custom column values (bulk) body","description":"Shape: { modelUuid, records: [{ id, data }, ...] } where data is custom column slugs to values."}}}},"responses":{"200":{"description":"Insert custom column values (bulk)","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/datasets/list":{"get":{"operationId":"getStorageDatasetsList","summary":"List datasets","description":"List all datasets in the workspace (GET /storage/datasets/list).","tags":["Storage - Datasets"],"parameters":[{"in":"query","name":"connectorUuid","schema":{"title":"Connector UUID","description":"Filter datasets by connector identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter datasets by connector identifier."}],"responses":{"200":{"description":"List datasets","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"datasets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Dataset identifier."},"workspaceUuid":{"type":"string","description":"Workspace this dataset belongs to."},"slug":{"type":"string","description":"Dataset slug."},"createdAt":{"description":"Time this dataset was created.","type":"string"},"updatedAt":{"description":"Time this dataset was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this dataset was deleted, if it has been."}},"required":["uuid","workspaceUuid","slug","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Dataset is backed by a connector.","enum":["connector"]},"connectorUuid":{"type":"string","description":"Connector this dataset is synced from."}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Dataset is a workspace-native store.","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}]},"title":"Datasets","description":"List of datasets."}},"required":["datasets"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/datasets/{uuid}":{"get":{"operationId":"getStorageDatasetsByUuid","summary":"Get dataset","description":"Get a dataset by UUID (GET /storage/datasets/{uuid}).","tags":["Storage - Datasets"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Dataset identifier."},"required":true,"description":"Dataset identifier."}],"responses":{"200":{"description":"Get dataset","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"dataset":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Dataset identifier."},"workspaceUuid":{"type":"string","description":"Workspace this dataset belongs to."},"slug":{"type":"string","description":"Dataset slug."},"createdAt":{"description":"Time this dataset was created.","type":"string"},"updatedAt":{"description":"Time this dataset was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this dataset was deleted, if it has been."}},"required":["uuid","workspaceUuid","slug","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Dataset is backed by a connector.","enum":["connector"]},"connectorUuid":{"type":"string","description":"Connector this dataset is synced from."}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Dataset is a workspace-native store.","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"Dataset","description":"Dataset details."}},"required":["dataset"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/models":{"post":{"operationId":"postStorageModels","summary":"Create model","description":"Create a new model (POST /storage/models).","tags":["Storage - Models"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Slug","description":"Model slug."},"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Model name."},"description":{"title":"Description","description":"Model description.","type":"string","minLength":1,"maxLength":1000},"datasetUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Dataset UUID","description":"Dataset identifier."},"extractorSlug":{"type":"string","minLength":1,"maxLength":63,"title":"Extractor slug","description":"Extractor identifier."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Config","description":"Model configuration."},"schedule":{"title":"Schedule","description":"Model schedule configuration.","anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Refresh after a dbt job completes.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers the refresh."}},"required":["type","jobId"]},{"type":"object","properties":{"type":{"type":"string","description":"Refresh on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that triggers the refresh."}},"required":["type","cron"]}]},"folderUuid":{"title":"Folder UUID","description":"Folder identifier. Only compatible with nativeIntegration define extractors.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["slug","name","datasetUuid","extractorSlug","config"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create model","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Model identifier."},"workspaceUuid":{"type":"string","description":"Workspace this model belongs to."},"slug":{"type":"string","description":"Model slug."},"name":{"type":"string","description":"Model display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable description of the model, if any."},"datasetUuid":{"type":"string","description":"Dataset this model belongs to."},"extractorSlug":{"type":"string","description":"Extractor that fills this model."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position of the model."},"y":{"type":"number","description":"Vertical canvas position of the model."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas coordinates of this model in the graph."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Extractor configuration for this model."},"schedule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Refresh after a dbt job completes.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers the refresh."}},"required":["type","jobId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Refresh on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that triggers the refresh."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this cron."}},"required":["type","cron","temporalScheduleWorkflowId"],"additionalProperties":false}]},{"type":"null"}],"description":"Refresh schedule for this model, if any."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Additional model metadata, if any."},"columns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column synced from the model's source extractor.","enum":["original"]},"originalSlug":{"type":"string","description":"Source column slug before any aliasing."}},"required":["slug","type","label","kind","originalSlug"],"additionalProperties":false},"description":"Source columns synced onto this model."},"additionalColumns":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Workspace-owned column stored on the model.","enum":["custom"]}},"required":["slug","type","label","kind"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column computed from an expression over other columns.","enum":["computed"]},"expression":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"expression":{"type":"string","description":"Expression source to evaluate."}},"required":["kind","instructTo","expression"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is not based on a recipe.","enum":[false]}},"required":["fromRecipe"],"additionalProperties":false},{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is based on a recipe.","enum":[true]},"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"version":{"type":"number","description":"Recipe version this expression uses."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values bound to each recipe placeholder."}},"required":["uuid","version","variables"],"additionalProperties":false,"description":"Recipe this expression was created from."}},"required":["fromRecipe","recipe"],"additionalProperties":false}]}],"description":"Expression that computes this column's value."},"columnsUsed":{"description":"Column slugs the expression reads, if known.","type":"array","items":{"type":"string"}}},"required":["slug","type","label","kind","expression"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column aggregated across a related model.","enum":["metric"]},"relationshipUuid":{"type":"string","description":"Relationship this metric aggregates across."},"aggregation":{"type":"object","properties":{"function":{"type":"string","enum":["AVG","COUNT","MAX","MIN","SUM"],"description":"Aggregation applied to the related column."},"columnSlug":{"type":"string","description":"Related column the aggregation is applied to."}},"required":["function","columnSlug"],"additionalProperties":false,"description":"How related rows are aggregated into this column."},"filter":{"description":"Filter restricting which related rows are aggregated.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["slug","type","label","kind","relationshipUuid","aggregation"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column looked up from a joined model.","enum":["lookup"]},"join":{"type":"object","properties":{"toModelUuid":{"type":"string","description":"Model this lookup joins to."},"fromColumnSlug":{"type":"string","description":"Column on this model used as the join key."},"toColumnSlug":{"type":"string","description":"Column on the joined model used as the join key."}},"required":["toModelUuid","fromColumnSlug","toColumnSlug"],"additionalProperties":false,"description":"Join used to resolve the looked-up value."},"extractColumnSlug":{"type":"string","description":"Column pulled from the joined model."},"filter":{"description":"Filter restricting which joined rows are considered.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["slug","type","label","kind","join","extractColumnSlug"],"additionalProperties":false}],"type":"object"},"description":"Custom, computed, metric, and lookup columns on this model."},"idColumnSlug":{"type":"string","description":"Column used as the record identifier."},"unification":{"anyOf":[{"oneOf":[{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping comes from the integration.","enum":["integration"]}},"required":["source"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping is declared on this model.","enum":["custom"]},"type":{"type":"string","enum":["account","contact","accountEvent","contactEvent"],"description":"Unified model this source feeds."},"uniqueColumns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column mapped to a unification reference."},"reference":{"type":"string","description":"Unification reference this column maps to."}},"required":["slug","reference"],"additionalProperties":false},"description":"Columns used to match records across sources."},"selectedColumnSlugs":{"description":"Columns exposed on the unified model, if limited.","type":"array","items":{"type":"string"}},"timeColumnSlug":{"description":"Column carrying the event timestamp, if this is an event model.","type":"string"},"parent":{"description":"How this record links to its parent entity, if it does.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through another model.","enum":["model"]},"columnSlug":{"type":"string","description":"Column on this model that points at the parent."},"parentModelUuid":{"type":"string","description":"Parent model this record links to."}},"required":["kind","columnSlug","parentModelUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through a unification reference.","enum":["reference"]},"columnSlug":{"type":"string","description":"Column on this model that holds the parent reference."},"reference":{"type":"string","description":"Unification reference used to resolve the parent."}},"required":["kind","columnSlug","reference"],"additionalProperties":false}],"type":"object"},"filter":{"description":"Filter restricting which rows participate in unification.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["source","type","uniqueColumns"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"How this model participates in unification, if it does."},"titleColumnSlug":{"type":"string","description":"Column used as the display title."},"timeColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column used as the record or event time, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this model is filed under, if any."},"playsCount":{"type":"number","description":"Number of plays that use this model."},"segmentsCount":{"type":"number","description":"Number of segments defined on this model."},"isPaused":{"type":"boolean","description":"Whether refreshes of this model are paused."},"lastEmittedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this model last emitted records, if it has."},"createdAt":{"description":"Time this model was created.","type":"string"},"updatedAt":{"description":"Time this model was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this model was deleted, if it has been."},"lastRun":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Most recent run identifier."},"status":{"type":"string","enum":["pending","running","cancelling","cancelled","error","success"],"description":"Status of the most recent run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error raised by the most recent run, if it failed."},"createdAt":{"description":"Time the most recent run was created.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the most recent run finished, if it has."}},"required":["uuid","status","errorMessage","createdAt","finishedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent refresh run for this model, if any."}},"required":["uuid","workspaceUuid","slug","name","description","datasetUuid","extractorSlug","position","config","schedule","meta","columns","additionalColumns","idColumnSlug","unification","titleColumnSlug","timeColumnSlug","folderUuid","playsCount","segmentsCount","isPaused","lastEmittedAt","createdAt","updatedAt","deletedAt","lastRun"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Model is backed by a connector.","enum":["connector"]},"connectorUuid":{"type":"string","description":"Connector this model is synced from."}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Model is a workspace-native table.","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"Model","description":"Created model details."}},"required":["model"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/models/list":{"get":{"operationId":"getStorageModelsList","summary":"List models","description":"List all models in the workspace (GET /storage/models/list).","tags":["Storage - Models"],"parameters":[{"in":"query","name":"datasetUuid","schema":{"title":"Dataset UUID","description":"Filter models by dataset identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter models by dataset identifier."}],"responses":{"200":{"description":"List models","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Model identifier."},"workspaceUuid":{"type":"string","description":"Workspace this model belongs to."},"slug":{"type":"string","description":"Model slug."},"name":{"type":"string","description":"Model display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable description of the model, if any."},"datasetUuid":{"type":"string","description":"Dataset this model belongs to."},"extractorSlug":{"type":"string","description":"Extractor that fills this model."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position of the model."},"y":{"type":"number","description":"Vertical canvas position of the model."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas coordinates of this model in the graph."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Extractor configuration for this model."},"schedule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Refresh after a dbt job completes.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers the refresh."}},"required":["type","jobId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Refresh on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that triggers the refresh."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this cron."}},"required":["type","cron","temporalScheduleWorkflowId"],"additionalProperties":false}]},{"type":"null"}],"description":"Refresh schedule for this model, if any."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Additional model metadata, if any."},"columns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column synced from the model's source extractor.","enum":["original"]},"originalSlug":{"type":"string","description":"Source column slug before any aliasing."}},"required":["slug","type","label","kind","originalSlug"],"additionalProperties":false},"description":"Source columns synced onto this model."},"additionalColumns":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Workspace-owned column stored on the model.","enum":["custom"]}},"required":["slug","type","label","kind"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column computed from an expression over other columns.","enum":["computed"]},"expression":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"expression":{"type":"string","description":"Expression source to evaluate."}},"required":["kind","instructTo","expression"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is not based on a recipe.","enum":[false]}},"required":["fromRecipe"],"additionalProperties":false},{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is based on a recipe.","enum":[true]},"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"version":{"type":"number","description":"Recipe version this expression uses."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values bound to each recipe placeholder."}},"required":["uuid","version","variables"],"additionalProperties":false,"description":"Recipe this expression was created from."}},"required":["fromRecipe","recipe"],"additionalProperties":false}]}],"description":"Expression that computes this column's value."},"columnsUsed":{"description":"Column slugs the expression reads, if known.","type":"array","items":{"type":"string"}}},"required":["slug","type","label","kind","expression"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column aggregated across a related model.","enum":["metric"]},"relationshipUuid":{"type":"string","description":"Relationship this metric aggregates across."},"aggregation":{"type":"object","properties":{"function":{"type":"string","enum":["AVG","COUNT","MAX","MIN","SUM"],"description":"Aggregation applied to the related column."},"columnSlug":{"type":"string","description":"Related column the aggregation is applied to."}},"required":["function","columnSlug"],"additionalProperties":false,"description":"How related rows are aggregated into this column."},"filter":{"description":"Filter restricting which related rows are aggregated.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["slug","type","label","kind","relationshipUuid","aggregation"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column looked up from a joined model.","enum":["lookup"]},"join":{"type":"object","properties":{"toModelUuid":{"type":"string","description":"Model this lookup joins to."},"fromColumnSlug":{"type":"string","description":"Column on this model used as the join key."},"toColumnSlug":{"type":"string","description":"Column on the joined model used as the join key."}},"required":["toModelUuid","fromColumnSlug","toColumnSlug"],"additionalProperties":false,"description":"Join used to resolve the looked-up value."},"extractColumnSlug":{"type":"string","description":"Column pulled from the joined model."},"filter":{"description":"Filter restricting which joined rows are considered.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["slug","type","label","kind","join","extractColumnSlug"],"additionalProperties":false}],"type":"object"},"description":"Custom, computed, metric, and lookup columns on this model."},"idColumnSlug":{"type":"string","description":"Column used as the record identifier."},"unification":{"anyOf":[{"oneOf":[{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping comes from the integration.","enum":["integration"]}},"required":["source"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping is declared on this model.","enum":["custom"]},"type":{"type":"string","enum":["account","contact","accountEvent","contactEvent"],"description":"Unified model this source feeds."},"uniqueColumns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column mapped to a unification reference."},"reference":{"type":"string","description":"Unification reference this column maps to."}},"required":["slug","reference"],"additionalProperties":false},"description":"Columns used to match records across sources."},"selectedColumnSlugs":{"description":"Columns exposed on the unified model, if limited.","type":"array","items":{"type":"string"}},"timeColumnSlug":{"description":"Column carrying the event timestamp, if this is an event model.","type":"string"},"parent":{"description":"How this record links to its parent entity, if it does.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through another model.","enum":["model"]},"columnSlug":{"type":"string","description":"Column on this model that points at the parent."},"parentModelUuid":{"type":"string","description":"Parent model this record links to."}},"required":["kind","columnSlug","parentModelUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through a unification reference.","enum":["reference"]},"columnSlug":{"type":"string","description":"Column on this model that holds the parent reference."},"reference":{"type":"string","description":"Unification reference used to resolve the parent."}},"required":["kind","columnSlug","reference"],"additionalProperties":false}],"type":"object"},"filter":{"description":"Filter restricting which rows participate in unification.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["source","type","uniqueColumns"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"How this model participates in unification, if it does."},"titleColumnSlug":{"type":"string","description":"Column used as the display title."},"timeColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column used as the record or event time, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this model is filed under, if any."},"playsCount":{"type":"number","description":"Number of plays that use this model."},"segmentsCount":{"type":"number","description":"Number of segments defined on this model."},"isPaused":{"type":"boolean","description":"Whether refreshes of this model are paused."},"lastEmittedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this model last emitted records, if it has."},"createdAt":{"description":"Time this model was created.","type":"string"},"updatedAt":{"description":"Time this model was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this model was deleted, if it has been."},"lastRun":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Most recent run identifier."},"status":{"type":"string","enum":["pending","running","cancelling","cancelled","error","success"],"description":"Status of the most recent run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error raised by the most recent run, if it failed."},"createdAt":{"description":"Time the most recent run was created.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the most recent run finished, if it has."}},"required":["uuid","status","errorMessage","createdAt","finishedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent refresh run for this model, if any."}},"required":["uuid","workspaceUuid","slug","name","description","datasetUuid","extractorSlug","position","config","schedule","meta","columns","additionalColumns","idColumnSlug","unification","titleColumnSlug","timeColumnSlug","folderUuid","playsCount","segmentsCount","isPaused","lastEmittedAt","createdAt","updatedAt","deletedAt","lastRun"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Model is backed by a connector.","enum":["connector"]},"connectorUuid":{"type":"string","description":"Connector this model is synced from."}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Model is a workspace-native table.","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}]},"title":"Models","description":"List of models."}},"required":["models"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/models/existsBySlug":{"get":{"operationId":"getStorageModelsExistsBySlug","summary":"Check model exists by slug","description":"Check if a model exists by its slug (GET /storage/models/existsBySlug).","tags":["Storage - Models"],"parameters":[{"in":"query","name":"slug","schema":{"type":"string","minLength":1,"maxLength":63,"title":"Slug","description":"Model slug to check."},"required":true,"description":"Model slug to check."},{"in":"query","name":"datasetUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Dataset UUID","description":"Dataset identifier."},"required":true,"description":"Dataset identifier."}],"responses":{"200":{"description":"Check model exists by slug","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean","title":"Exists","description":"Whether the model exists."}},"required":["exists"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/models/{uuid}":{"get":{"operationId":"getStorageModelsByUuid","summary":"Get model","description":"Get a model by UUID (GET /storage/models/{uuid}).","tags":["Storage - Models"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Model identifier."},"required":true,"description":"Model identifier."}],"responses":{"200":{"description":"Get model","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Model identifier."},"workspaceUuid":{"type":"string","description":"Workspace this model belongs to."},"slug":{"type":"string","description":"Model slug."},"name":{"type":"string","description":"Model display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable description of the model, if any."},"datasetUuid":{"type":"string","description":"Dataset this model belongs to."},"extractorSlug":{"type":"string","description":"Extractor that fills this model."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position of the model."},"y":{"type":"number","description":"Vertical canvas position of the model."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas coordinates of this model in the graph."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Extractor configuration for this model."},"schedule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Refresh after a dbt job completes.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers the refresh."}},"required":["type","jobId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Refresh on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that triggers the refresh."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this cron."}},"required":["type","cron","temporalScheduleWorkflowId"],"additionalProperties":false}]},{"type":"null"}],"description":"Refresh schedule for this model, if any."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Additional model metadata, if any."},"columns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column synced from the model's source extractor.","enum":["original"]},"originalSlug":{"type":"string","description":"Source column slug before any aliasing."}},"required":["slug","type","label","kind","originalSlug"],"additionalProperties":false},"description":"Source columns synced onto this model."},"additionalColumns":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Workspace-owned column stored on the model.","enum":["custom"]}},"required":["slug","type","label","kind"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column computed from an expression over other columns.","enum":["computed"]},"expression":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"expression":{"type":"string","description":"Expression source to evaluate."}},"required":["kind","instructTo","expression"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is not based on a recipe.","enum":[false]}},"required":["fromRecipe"],"additionalProperties":false},{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is based on a recipe.","enum":[true]},"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"version":{"type":"number","description":"Recipe version this expression uses."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values bound to each recipe placeholder."}},"required":["uuid","version","variables"],"additionalProperties":false,"description":"Recipe this expression was created from."}},"required":["fromRecipe","recipe"],"additionalProperties":false}]}],"description":"Expression that computes this column's value."},"columnsUsed":{"description":"Column slugs the expression reads, if known.","type":"array","items":{"type":"string"}}},"required":["slug","type","label","kind","expression"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column aggregated across a related model.","enum":["metric"]},"relationshipUuid":{"type":"string","description":"Relationship this metric aggregates across."},"aggregation":{"type":"object","properties":{"function":{"type":"string","enum":["AVG","COUNT","MAX","MIN","SUM"],"description":"Aggregation applied to the related column."},"columnSlug":{"type":"string","description":"Related column the aggregation is applied to."}},"required":["function","columnSlug"],"additionalProperties":false,"description":"How related rows are aggregated into this column."},"filter":{"description":"Filter restricting which related rows are aggregated.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["slug","type","label","kind","relationshipUuid","aggregation"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column looked up from a joined model.","enum":["lookup"]},"join":{"type":"object","properties":{"toModelUuid":{"type":"string","description":"Model this lookup joins to."},"fromColumnSlug":{"type":"string","description":"Column on this model used as the join key."},"toColumnSlug":{"type":"string","description":"Column on the joined model used as the join key."}},"required":["toModelUuid","fromColumnSlug","toColumnSlug"],"additionalProperties":false,"description":"Join used to resolve the looked-up value."},"extractColumnSlug":{"type":"string","description":"Column pulled from the joined model."},"filter":{"description":"Filter restricting which joined rows are considered.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["slug","type","label","kind","join","extractColumnSlug"],"additionalProperties":false}],"type":"object"},"description":"Custom, computed, metric, and lookup columns on this model."},"idColumnSlug":{"type":"string","description":"Column used as the record identifier."},"unification":{"anyOf":[{"oneOf":[{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping comes from the integration.","enum":["integration"]}},"required":["source"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping is declared on this model.","enum":["custom"]},"type":{"type":"string","enum":["account","contact","accountEvent","contactEvent"],"description":"Unified model this source feeds."},"uniqueColumns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column mapped to a unification reference."},"reference":{"type":"string","description":"Unification reference this column maps to."}},"required":["slug","reference"],"additionalProperties":false},"description":"Columns used to match records across sources."},"selectedColumnSlugs":{"description":"Columns exposed on the unified model, if limited.","type":"array","items":{"type":"string"}},"timeColumnSlug":{"description":"Column carrying the event timestamp, if this is an event model.","type":"string"},"parent":{"description":"How this record links to its parent entity, if it does.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through another model.","enum":["model"]},"columnSlug":{"type":"string","description":"Column on this model that points at the parent."},"parentModelUuid":{"type":"string","description":"Parent model this record links to."}},"required":["kind","columnSlug","parentModelUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through a unification reference.","enum":["reference"]},"columnSlug":{"type":"string","description":"Column on this model that holds the parent reference."},"reference":{"type":"string","description":"Unification reference used to resolve the parent."}},"required":["kind","columnSlug","reference"],"additionalProperties":false}],"type":"object"},"filter":{"description":"Filter restricting which rows participate in unification.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["source","type","uniqueColumns"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"How this model participates in unification, if it does."},"titleColumnSlug":{"type":"string","description":"Column used as the display title."},"timeColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column used as the record or event time, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this model is filed under, if any."},"playsCount":{"type":"number","description":"Number of plays that use this model."},"segmentsCount":{"type":"number","description":"Number of segments defined on this model."},"isPaused":{"type":"boolean","description":"Whether refreshes of this model are paused."},"lastEmittedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this model last emitted records, if it has."},"createdAt":{"description":"Time this model was created.","type":"string"},"updatedAt":{"description":"Time this model was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this model was deleted, if it has been."},"lastRun":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Most recent run identifier."},"status":{"type":"string","enum":["pending","running","cancelling","cancelled","error","success"],"description":"Status of the most recent run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error raised by the most recent run, if it failed."},"createdAt":{"description":"Time the most recent run was created.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the most recent run finished, if it has."}},"required":["uuid","status","errorMessage","createdAt","finishedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent refresh run for this model, if any."}},"required":["uuid","workspaceUuid","slug","name","description","datasetUuid","extractorSlug","position","config","schedule","meta","columns","additionalColumns","idColumnSlug","unification","titleColumnSlug","timeColumnSlug","folderUuid","playsCount","segmentsCount","isPaused","lastEmittedAt","createdAt","updatedAt","deletedAt","lastRun"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Model is backed by a connector.","enum":["connector"]},"connectorUuid":{"type":"string","description":"Connector this model is synced from."}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Model is a workspace-native table.","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"Model","description":"Model details."}},"required":["model"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putStorageModelsByUuid","summary":"Update model","description":"Update a model by UUID (PUT /storage/models/{uuid}).","tags":["Storage - Models"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Model identifier."},"required":true,"description":"Model identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Model name.","type":"string","minLength":1,"maxLength":255},"description":{"title":"Description","description":"Model description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"position":{"title":"Position","description":"Model position in the canvas.","type":"object","properties":{"x":{"type":"number","title":"X","description":"Horizontal position."},"y":{"type":"number","title":"Y","description":"Vertical position."}},"required":["x","y"]},"config":{"title":"Config","description":"Model configuration.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"schedule":{"title":"Schedule","description":"Model schedule configuration.","anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Refresh after a dbt job completes.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers the refresh."}},"required":["type","jobId"]},{"type":"object","properties":{"type":{"type":"string","description":"Refresh on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that triggers the refresh."}},"required":["type","cron"]}]},{"type":"null"}]},"unification":{"title":"Unification","description":"Model unification configuration.","anyOf":[{"oneOf":[{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping comes from the integration.","enum":["integration"]}},"required":["source"]},{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping is declared on this model.","enum":["custom"]},"type":{"type":"string","enum":["account","contact","accountEvent","contactEvent"],"description":"Unified model this source feeds."},"uniqueColumns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column mapped to a unification reference."},"reference":{"type":"string","description":"Unification reference this column maps to."}},"required":["slug","reference"]},"description":"Columns used to match records across sources."},"selectedColumnSlugs":{"description":"Columns exposed on the unified model, if limited.","type":"array","items":{"type":"string"}},"timeColumnSlug":{"description":"Column carrying the event timestamp, if this is an event model.","type":"string"},"parent":{"description":"How this record links to its parent entity, if it does.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through another model.","enum":["model"]},"columnSlug":{"type":"string","description":"Column on this model that points at the parent."},"parentModelUuid":{"type":"string","description":"Parent model this record links to."}},"required":["kind","columnSlug","parentModelUuid"]},{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through a unification reference.","enum":["reference"]},"columnSlug":{"type":"string","description":"Column on this model that holds the parent reference."},"reference":{"type":"string","description":"Unification reference used to resolve the parent."}},"required":["kind","columnSlug","reference"]}],"type":"object"},"filter":{"description":"Filter restricting which rows participate in unification.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"]}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"]}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"]},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"]},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"]}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"]}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"]}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"]},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"]}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"]},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"]}},"required":["source","type","uniqueColumns"]}],"type":"object"},{"type":"null"}]},"folderUuid":{"title":"Folder UUID","description":"Folder identifier. Only compatible with nativeIntegration define extractors.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update model","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Model identifier."},"workspaceUuid":{"type":"string","description":"Workspace this model belongs to."},"slug":{"type":"string","description":"Model slug."},"name":{"type":"string","description":"Model display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable description of the model, if any."},"datasetUuid":{"type":"string","description":"Dataset this model belongs to."},"extractorSlug":{"type":"string","description":"Extractor that fills this model."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position of the model."},"y":{"type":"number","description":"Vertical canvas position of the model."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas coordinates of this model in the graph."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Extractor configuration for this model."},"schedule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Refresh after a dbt job completes.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers the refresh."}},"required":["type","jobId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Refresh on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that triggers the refresh."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this cron."}},"required":["type","cron","temporalScheduleWorkflowId"],"additionalProperties":false}]},{"type":"null"}],"description":"Refresh schedule for this model, if any."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Additional model metadata, if any."},"columns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column synced from the model's source extractor.","enum":["original"]},"originalSlug":{"type":"string","description":"Source column slug before any aliasing."}},"required":["slug","type","label","kind","originalSlug"],"additionalProperties":false},"description":"Source columns synced onto this model."},"additionalColumns":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Workspace-owned column stored on the model.","enum":["custom"]}},"required":["slug","type","label","kind"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column computed from an expression over other columns.","enum":["computed"]},"expression":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"expression":{"type":"string","description":"Expression source to evaluate."}},"required":["kind","instructTo","expression"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is not based on a recipe.","enum":[false]}},"required":["fromRecipe"],"additionalProperties":false},{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is based on a recipe.","enum":[true]},"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"version":{"type":"number","description":"Recipe version this expression uses."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values bound to each recipe placeholder."}},"required":["uuid","version","variables"],"additionalProperties":false,"description":"Recipe this expression was created from."}},"required":["fromRecipe","recipe"],"additionalProperties":false}]}],"description":"Expression that computes this column's value."},"columnsUsed":{"description":"Column slugs the expression reads, if known.","type":"array","items":{"type":"string"}}},"required":["slug","type","label","kind","expression"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column aggregated across a related model.","enum":["metric"]},"relationshipUuid":{"type":"string","description":"Relationship this metric aggregates across."},"aggregation":{"type":"object","properties":{"function":{"type":"string","enum":["AVG","COUNT","MAX","MIN","SUM"],"description":"Aggregation applied to the related column."},"columnSlug":{"type":"string","description":"Related column the aggregation is applied to."}},"required":["function","columnSlug"],"additionalProperties":false,"description":"How related rows are aggregated into this column."},"filter":{"description":"Filter restricting which related rows are aggregated.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["slug","type","label","kind","relationshipUuid","aggregation"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column looked up from a joined model.","enum":["lookup"]},"join":{"type":"object","properties":{"toModelUuid":{"type":"string","description":"Model this lookup joins to."},"fromColumnSlug":{"type":"string","description":"Column on this model used as the join key."},"toColumnSlug":{"type":"string","description":"Column on the joined model used as the join key."}},"required":["toModelUuid","fromColumnSlug","toColumnSlug"],"additionalProperties":false,"description":"Join used to resolve the looked-up value."},"extractColumnSlug":{"type":"string","description":"Column pulled from the joined model."},"filter":{"description":"Filter restricting which joined rows are considered.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["slug","type","label","kind","join","extractColumnSlug"],"additionalProperties":false}],"type":"object"},"description":"Custom, computed, metric, and lookup columns on this model."},"idColumnSlug":{"type":"string","description":"Column used as the record identifier."},"unification":{"anyOf":[{"oneOf":[{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping comes from the integration.","enum":["integration"]}},"required":["source"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping is declared on this model.","enum":["custom"]},"type":{"type":"string","enum":["account","contact","accountEvent","contactEvent"],"description":"Unified model this source feeds."},"uniqueColumns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column mapped to a unification reference."},"reference":{"type":"string","description":"Unification reference this column maps to."}},"required":["slug","reference"],"additionalProperties":false},"description":"Columns used to match records across sources."},"selectedColumnSlugs":{"description":"Columns exposed on the unified model, if limited.","type":"array","items":{"type":"string"}},"timeColumnSlug":{"description":"Column carrying the event timestamp, if this is an event model.","type":"string"},"parent":{"description":"How this record links to its parent entity, if it does.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through another model.","enum":["model"]},"columnSlug":{"type":"string","description":"Column on this model that points at the parent."},"parentModelUuid":{"type":"string","description":"Parent model this record links to."}},"required":["kind","columnSlug","parentModelUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through a unification reference.","enum":["reference"]},"columnSlug":{"type":"string","description":"Column on this model that holds the parent reference."},"reference":{"type":"string","description":"Unification reference used to resolve the parent."}},"required":["kind","columnSlug","reference"],"additionalProperties":false}],"type":"object"},"filter":{"description":"Filter restricting which rows participate in unification.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["source","type","uniqueColumns"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"How this model participates in unification, if it does."},"titleColumnSlug":{"type":"string","description":"Column used as the display title."},"timeColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column used as the record or event time, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this model is filed under, if any."},"playsCount":{"type":"number","description":"Number of plays that use this model."},"segmentsCount":{"type":"number","description":"Number of segments defined on this model."},"isPaused":{"type":"boolean","description":"Whether refreshes of this model are paused."},"lastEmittedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this model last emitted records, if it has."},"createdAt":{"description":"Time this model was created.","type":"string"},"updatedAt":{"description":"Time this model was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this model was deleted, if it has been."},"lastRun":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Most recent run identifier."},"status":{"type":"string","enum":["pending","running","cancelling","cancelled","error","success"],"description":"Status of the most recent run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error raised by the most recent run, if it failed."},"createdAt":{"description":"Time the most recent run was created.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the most recent run finished, if it has."}},"required":["uuid","status","errorMessage","createdAt","finishedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent refresh run for this model, if any."}},"required":["uuid","workspaceUuid","slug","name","description","datasetUuid","extractorSlug","position","config","schedule","meta","columns","additionalColumns","idColumnSlug","unification","titleColumnSlug","timeColumnSlug","folderUuid","playsCount","segmentsCount","isPaused","lastEmittedAt","createdAt","updatedAt","deletedAt","lastRun"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Model is backed by a connector.","enum":["connector"]},"connectorUuid":{"type":"string","description":"Connector this model is synced from."}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Model is a workspace-native table.","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"Model","description":"Updated model details."}},"required":["model"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteStorageModelsByUuid","summary":"Remove model","description":"Remove a model by UUID (DELETE /storage/models/{uuid}).","tags":["Storage - Models"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Model identifier."},"required":true,"description":"Model identifier."}],"responses":{"200":{"description":"Remove model","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/models/{uuid}/ddl":{"get":{"operationId":"getStorageModelsByUuidDdl","summary":"Get model DDL","description":"Get the DDL for a model's table in the system of record (GET /storage/models/{uuid}/ddl).","tags":["Storage - Models"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","description":"Resource UUID"},"required":true,"description":"Resource UUID"}],"responses":{"200":{"description":"Get model DDL","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"ddl":{"type":"string","title":"DDL","description":"Data Definition Language for the model table."},"language":{"type":"string","title":"Language","description":"System of record dialect (e.g. snowflake, bigquery)."}},"required":["ddl","language"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/models/preview":{"post":{"operationId":"postStorageModelsPreview","summary":"Preview model","description":"Preview model data (POST /storage/models/preview).","tags":["Storage - Models"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"datasetUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Dataset UUID","description":"Dataset identifier."},"slug":{"type":"string","title":"Slug","description":"Model slug."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Config","description":"Model configuration."}},"required":["datasetUuid","slug","config"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Preview model","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","title":"Outcome","description":"Preview outcome.","enum":["previewed"]},"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Preview records."},"columns":{"type":"array","items":{},"title":"Columns","description":"Preview columns."}},"required":["outcome","records","columns"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/models/previewCount":{"post":{"operationId":"postStorageModelsPreviewCount","summary":"Preview model count","description":"Get preview count for model data (POST /storage/models/previewCount).","tags":["Storage - Models"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"datasetUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Dataset UUID","description":"Dataset identifier."},"slug":{"type":"string","title":"Slug","description":"Model slug."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Config","description":"Model configuration."}},"required":["datasetUuid","slug","config"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Preview model count","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","title":"Outcome","description":"Preview outcome.","enum":["previewed"]},"count":{"type":"number","title":"Count","description":"Preview count."}},"required":["outcome","count"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/models/{uuid}/refresh":{"post":{"operationId":"postStorageModelsByUuidRefresh","summary":"Refresh model","description":"Refresh a model's tables with the latest data (POST /storage/models/{uuid}/refresh).","tags":["Storage - Models"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Model identifier."},"required":true,"description":"Model identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Refresh model","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Model identifier."},"workspaceUuid":{"type":"string","description":"Workspace this model belongs to."},"slug":{"type":"string","description":"Model slug."},"name":{"type":"string","description":"Model display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable description of the model, if any."},"datasetUuid":{"type":"string","description":"Dataset this model belongs to."},"extractorSlug":{"type":"string","description":"Extractor that fills this model."},"position":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal canvas position of the model."},"y":{"type":"number","description":"Vertical canvas position of the model."}},"required":["x","y"],"additionalProperties":false,"description":"Canvas coordinates of this model in the graph."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Extractor configuration for this model."},"schedule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Refresh after a dbt job completes.","enum":["dbt"]},"jobId":{"type":"string","description":"dbt job that triggers the refresh."}},"required":["type","jobId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","description":"Refresh on a cron schedule.","enum":["cron"]},"cron":{"type":"string","description":"Cron expression that triggers the refresh."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that fires this cron."}},"required":["type","cron","temporalScheduleWorkflowId"],"additionalProperties":false}]},{"type":"null"}],"description":"Refresh schedule for this model, if any."},"meta":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Additional model metadata, if any."},"columns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column synced from the model's source extractor.","enum":["original"]},"originalSlug":{"type":"string","description":"Source column slug before any aliasing."}},"required":["slug","type","label","kind","originalSlug"],"additionalProperties":false},"description":"Source columns synced onto this model."},"additionalColumns":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Workspace-owned column stored on the model.","enum":["custom"]}},"required":["slug","type","label","kind"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column computed from an expression over other columns.","enum":["computed"]},"expression":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["jsExpression","templateExpression"],"description":"Whether this is a JavaScript expression or a template expression."},"instructTo":{"type":"string","enum":["ai","none"],"description":"Whether the evaluated result is then passed to the AI."},"expression":{"type":"string","description":"Expression source to evaluate."}},"required":["kind","instructTo","expression"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is not based on a recipe.","enum":[false]}},"required":["fromRecipe"],"additionalProperties":false},{"type":"object","properties":{"fromRecipe":{"type":"boolean","description":"Expression is based on a recipe.","enum":[true]},"recipe":{"type":"object","properties":{"uuid":{"type":"string","description":"Recipe identifier."},"version":{"type":"number","description":"Recipe version this expression uses."},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values bound to each recipe placeholder."}},"required":["uuid","version","variables"],"additionalProperties":false,"description":"Recipe this expression was created from."}},"required":["fromRecipe","recipe"],"additionalProperties":false}]}],"description":"Expression that computes this column's value."},"columnsUsed":{"description":"Column slugs the expression reads, if known.","type":"array","items":{"type":"string"}}},"required":["slug","type","label","kind","expression"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column aggregated across a related model.","enum":["metric"]},"relationshipUuid":{"type":"string","description":"Relationship this metric aggregates across."},"aggregation":{"type":"object","properties":{"function":{"type":"string","enum":["AVG","COUNT","MAX","MIN","SUM"],"description":"Aggregation applied to the related column."},"columnSlug":{"type":"string","description":"Related column the aggregation is applied to."}},"required":["function","columnSlug"],"additionalProperties":false,"description":"How related rows are aggregated into this column."},"filter":{"description":"Filter restricting which related rows are aggregated.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["slug","type","label","kind","relationshipUuid","aggregation"],"additionalProperties":false},{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Column slug."},"type":{"type":"string","enum":["string","number","object","array","date","boolean","any","vector"],"description":"Runtime type of the column values."},"properties":{"description":"Known property names when the column is an object or array.","type":"array","items":{"type":"string"}},"label":{"type":"string","description":"Column display name."},"description":{"description":"Human-readable description of the column, if any.","type":"string"},"kind":{"type":"string","description":"Column looked up from a joined model.","enum":["lookup"]},"join":{"type":"object","properties":{"toModelUuid":{"type":"string","description":"Model this lookup joins to."},"fromColumnSlug":{"type":"string","description":"Column on this model used as the join key."},"toColumnSlug":{"type":"string","description":"Column on the joined model used as the join key."}},"required":["toModelUuid","fromColumnSlug","toColumnSlug"],"additionalProperties":false,"description":"Join used to resolve the looked-up value."},"extractColumnSlug":{"type":"string","description":"Column pulled from the joined model."},"filter":{"description":"Filter restricting which joined rows are considered.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["slug","type","label","kind","join","extractColumnSlug"],"additionalProperties":false}],"type":"object"},"description":"Custom, computed, metric, and lookup columns on this model."},"idColumnSlug":{"type":"string","description":"Column used as the record identifier."},"unification":{"anyOf":[{"oneOf":[{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping comes from the integration.","enum":["integration"]}},"required":["source"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","description":"Unification mapping is declared on this model.","enum":["custom"]},"type":{"type":"string","enum":["account","contact","accountEvent","contactEvent"],"description":"Unified model this source feeds."},"uniqueColumns":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Column mapped to a unification reference."},"reference":{"type":"string","description":"Unification reference this column maps to."}},"required":["slug","reference"],"additionalProperties":false},"description":"Columns used to match records across sources."},"selectedColumnSlugs":{"description":"Columns exposed on the unified model, if limited.","type":"array","items":{"type":"string"}},"timeColumnSlug":{"description":"Column carrying the event timestamp, if this is an event model.","type":"string"},"parent":{"description":"How this record links to its parent entity, if it does.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through another model.","enum":["model"]},"columnSlug":{"type":"string","description":"Column on this model that points at the parent."},"parentModelUuid":{"type":"string","description":"Parent model this record links to."}},"required":["kind","columnSlug","parentModelUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Parent is resolved through a unification reference.","enum":["reference"]},"columnSlug":{"type":"string","description":"Column on this model that holds the parent reference."},"reference":{"type":"string","description":"Unification reference used to resolve the parent."}},"required":["kind","columnSlug","reference"],"additionalProperties":false}],"type":"object"},"filter":{"description":"Filter restricting which rows participate in unification.","type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the groups in this filter are combined."},"groups":{"type":"array","items":{"type":"object","properties":{"conjonction":{"type":"string","enum":["or","and"],"description":"How the conditions in this group are combined."},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Match rows with a raw SQL clause.","enum":["sql"]},"name":{"type":"string","description":"Display name of this SQL condition."},"clause":{"type":"string","description":"SQL WHERE clause evaluated against the model."}},"required":["kind","name","clause"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by how often related records occur.","enum":["occurrence"]},"relatedModelUuid":{"type":"string","description":"Related model whose matching records are counted."},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching related records exist.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching related records are required."},"value":{"type":"number","description":"Occurrence count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching related records are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those related records must fall in."},"conjonction":{"type":"string","enum":["or","and"],"description":"How the nested occurrence conditions are combined."},"conditions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a string column.","enum":["string"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"String column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","doesNotContain","startsWith","endsWith"],"description":"How the string column is compared to the provided values."},"values":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"String value or values to compare against."}},"required":["operator","values"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the string column is null, empty, or populated."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a number column.","enum":["number"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Number column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the number column is compared to the provided value."},"value":{"type":"number","description":"Number to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the number column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"number","description":"Lower bound of the inclusive range."},"lastValue":{"type":"number","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the number column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an object column.","enum":["object"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on this object column.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against the object column."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare an array column.","enum":["array"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Array column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is null.","enum":["isNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the array column is not null.","enum":["isNotNull"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match nested property conditions on items in this array.","enum":["matchConditions"]},"conjonction":{"type":"string","enum":["or","and"],"description":"How the property conditions are combined."},"propertyConditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a property inside an object column.","enum":["objectProperty"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Object column that contains the compared property."},"propertyName":{"type":"string","description":"Property name inside the object column."}},"required":["kind","columnSlug","propertyName"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","contains","greaterThan","lowerThan","doesNotContain","startsWith","endsWith"],"description":"How the object property is compared to the provided value."},"value":{"type":"string","description":"Value to compare the object property against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull","isEmpty","isNotEmpty"],"description":"Whether the object property is null, empty, or populated."}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the object property falls in an inclusive range.","enum":["between"]},"value":{"type":"string","description":"Lower bound of the inclusive range."},"otherValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","value","otherValue"],"additionalProperties":false}]}]},"description":"Property conditions evaluated against array items."}},"required":["operator","conjonction","propertyConditions"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a column of unknown type.","enum":["any"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a vector column.","enum":["vector"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Vector column this condition compares."},"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the vector column is null."}},"required":["kind","columnSlug","operator"],"additionalProperties":false},{"allOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Compare a date column.","enum":["date"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Date column this condition compares."}},"required":["kind","columnSlug"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is","isNot","greaterThan","lowerThan"],"description":"How the date column is compared to the provided value."},"value":{"type":"string","description":"Date to compare the column against."}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","description":"Match when the date column falls in an inclusive range.","enum":["between"]},"firstValue":{"type":"string","description":"Lower bound of the inclusive range."},"lastValue":{"type":"string","description":"Upper bound of the inclusive range."}},"required":["operator","firstValue","lastValue"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"],"description":"Whether the date column is null."}},"required":["operator"],"additionalProperties":false}]}]},{"type":"object","properties":{"kind":{"type":"string","description":"Compare a boolean column.","enum":["boolean"]},"relatedModelUuid":{"description":"Related model this column is read from, if the condition crosses a relationship.","type":"string"},"columnSlug":{"type":"string","description":"Boolean column this condition compares."},"operator":{"type":"string","enum":["isTrue","isFalse","isNull","isNotNull"],"description":"How the boolean column is compared."}},"required":["kind","columnSlug","operator"],"additionalProperties":false}]},"description":"Conditions the counted related records must match."}},"required":["kind","relatedModelUuid","frequency","period","conjonction","conditions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by play enrollment activity.","enum":["enrollment"]},"workflowUuid":{"type":"string","description":"Play whose enrollment activity is counted."},"activityKind":{"type":"string","enum":["workflowEntered","workflowNodeExecuted","workflowLeft"],"description":"Enrollment event that is counted."},"nodeSlug":{"description":"Play node whose execution is counted, if activity is node-scoped.","type":"string"},"frequency":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","description":"Require that no matching enrollment activity exists.","enum":["not"]}},"required":["operator"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["moreThan","lessThan","exactly"],"description":"How many matching enrollment events are required."},"value":{"type":"number","description":"Enrollment event count to compare against."}},"required":["operator","value"],"additionalProperties":false}],"description":"How many matching enrollment events are required."},"period":{"type":"object","properties":{"operator":{"type":"string","enum":["lessThan","moreThan","exactly"],"description":"How the lookback window is compared."},"value":{"type":"number","description":"Length of the lookback window."},"unit":{"type":"string","description":"Unit of the lookback window.","enum":["day"]}},"required":["operator","value","unit"],"additionalProperties":false,"description":"Lookback window those enrollment events must fall in."}},"required":["kind","workflowUuid","activityKind","frequency","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Match rows by membership in another segment.","enum":["segment"]},"segmentUuid":{"type":"string","description":"Segment whose membership is checked."},"operator":{"type":"string","enum":["in","notIn"],"description":"Whether the row must be in or not in the segment."}},"required":["kind","segmentUuid","operator"],"additionalProperties":false}]},"description":"Conditions evaluated in this group."}},"required":["conjonction","conditions"],"additionalProperties":false},"description":"Groups of conditions that make up this filter."}},"required":["conjonction","groups"],"additionalProperties":false}},"required":["source","type","uniqueColumns"],"additionalProperties":false}],"type":"object"},{"type":"null"}],"description":"How this model participates in unification, if it does."},"titleColumnSlug":{"type":"string","description":"Column used as the display title."},"timeColumnSlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Column used as the record or event time, if any."},"folderUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder this model is filed under, if any."},"playsCount":{"type":"number","description":"Number of plays that use this model."},"segmentsCount":{"type":"number","description":"Number of segments defined on this model."},"isPaused":{"type":"boolean","description":"Whether refreshes of this model are paused."},"lastEmittedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this model last emitted records, if it has."},"createdAt":{"description":"Time this model was created.","type":"string"},"updatedAt":{"description":"Time this model was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this model was deleted, if it has been."},"lastRun":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Most recent run identifier."},"status":{"type":"string","enum":["pending","running","cancelling","cancelled","error","success"],"description":"Status of the most recent run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error raised by the most recent run, if it failed."},"createdAt":{"description":"Time the most recent run was created.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the most recent run finished, if it has."}},"required":["uuid","status","errorMessage","createdAt","finishedAt"],"additionalProperties":false},{"type":"null"}],"description":"Most recent refresh run for this model, if any."}},"required":["uuid","workspaceUuid","slug","name","description","datasetUuid","extractorSlug","position","config","schedule","meta","columns","additionalColumns","idColumnSlug","unification","titleColumnSlug","timeColumnSlug","folderUuid","playsCount","segmentsCount","isPaused","lastEmittedAt","createdAt","updatedAt","deletedAt","lastRun"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Model is backed by a connector.","enum":["connector"]},"connectorUuid":{"type":"string","description":"Connector this model is synced from."}},"required":["kind","connectorUuid"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Model is a workspace-native table.","enum":["native"]}},"required":["kind"],"additionalProperties":false}]}],"title":"Model","description":"Refreshed model details."},"isRefreshing":{"type":"boolean","title":"Is refreshing","description":"Whether a refresh was still running, so this one did not complete. Very recent writes may be missing."}},"required":["model","isRefreshing"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/records/get":{"get":{"operationId":"getStorageRecordsGet","summary":"Get record","description":"Get a record for a model by ID (GET /storage/records/get).","tags":["Storage - Records"],"parameters":[{"in":"query","name":"modelUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"required":true,"description":"Model identifier."},{"in":"query","name":"id","schema":{"type":"string","title":"Record ID","description":"Record identifier."},"required":true,"description":"Record identifier."}],"responses":{"200":{"description":"Get record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"record":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Record","description":"Returned record."},"isRefreshing":{"type":"boolean","title":"Is refreshing","description":"Whether a model refresh was still running, so very recent writes may be missing. Fetch again shortly for fresher data."}},"required":["record","isRefreshing"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/records/list":{"post":{"operationId":"postStorageRecordsList","summary":"List records","description":"List records for a model (POST /storage/records/list).","tags":["Storage - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"fromIngest":{"title":"From ingest","description":"When true, returns records from ingest cache.","type":"boolean"},"limit":{"title":"Limit","description":"Maximum number of records to return.","type":"integer","minimum":1,"maximum":100},"offset":{"title":"Offset","description":"Number of records to skip.","type":"integer","minimum":0,"maximum":9007199254740991},"sort":{"title":"Sort","description":"Sorting options.","type":"object","properties":{"kind":{"type":"string","enum":["asc","desc"],"title":"Sort kind","description":"Sort direction."},"columnSlug":{"type":"string","enum":["_id","_title","_emitted_at"],"title":"Sort column","description":"Column used for sorting. \"_emitted_at\" is only available on models built from ingested records, not on models materialized from a query."}},"required":["kind","columnSlug"],"additionalProperties":false}},"required":["modelUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"List records","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"isRefreshing":{"type":"boolean","title":"Is refreshing","description":"Whether a model refresh was still running, so very recent writes may be missing. Fetch again shortly for fresher data."},"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Listed records."}},"required":["isRefreshing","records"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/records/create":{"post":{"operationId":"postStorageRecordsCreate","summary":"Create record","description":"Insert a single model row. Body: { modelUuid, data } where data is the row fields. (POST /storage/records/create).","tags":["Storage - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Target model."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Record data","description":"Fields for the single row to insert. Serialized JSON must be at most 3145728 bytes."}},"required":["modelUuid","data"],"additionalProperties":false,"title":"Create record body","description":"Shape: { modelUuid, data } where data is the record payload."}}}},"responses":{"200":{"description":"Create record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"record":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Record","description":"Inserted record as returned by storage."}},"required":["record"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/records/createBulk":{"post":{"operationId":"postStorageRecordsCreateBulk","summary":"Create records (bulk)","description":"Insert multiple model rows in one call. Body: { modelUuid, records: [{ data }, ...] }. (POST /storage/records/createBulk).","tags":["Storage - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Target model."},"records":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Record data","description":"Fields for the row to insert. Serialized JSON must be at most 3145728 bytes."}},"required":["data"],"additionalProperties":false,"title":"Record","description":"A single record entry to insert."},"title":"Records","description":"Records to insert. Up to 1000 per request."}},"required":["modelUuid","records"],"additionalProperties":false,"title":"Create records (bulk) body","description":"Shape: { modelUuid, records: [{ data }, ...] } where each data is a row payload."}}}},"responses":{"200":{"description":"Create records (bulk)","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Inserted records as returned by storage."}},"required":["records"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/records/update":{"put":{"operationId":"putStorageRecordsUpdate","summary":"Update record","description":"Update a single row. Body: { modelUuid, id, data }; data is merged then id is set under the model id column slug. (PUT /storage/records/update).","tags":["Storage - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Target model."},"id":{"type":"string","minLength":1,"title":"Record ID","description":"Record identifier; merged into the payload under the model id column slug (overrides the same key in data)."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Record data","description":"Fields to update for the row. Serialized JSON must be at most 3145728 bytes."}},"required":["modelUuid","id","data"],"additionalProperties":false,"title":"Update record body","description":"Shape: { modelUuid, id, data }. data is merged then id is applied under the model id column slug."}}}},"responses":{"200":{"description":"Update record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"record":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Record","description":"Updated record as returned by storage."}},"required":["record"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/records/updateBulk":{"put":{"operationId":"putStorageRecordsUpdateBulk","summary":"Update records (bulk)","description":"Update multiple rows in one call. Body: { modelUuid, records: [{ id, data }, ...] }. (PUT /storage/records/updateBulk).","tags":["Storage - Records"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Target model."},"records":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"title":"Record ID","description":"Record identifier; merged into the payload under the model id column slug (overrides the same key in data)."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Record data","description":"Fields to update for the row. Serialized JSON must be at most 3145728 bytes."}},"required":["id","data"],"additionalProperties":false,"title":"Record","description":"A single record entry to update."},"title":"Records","description":"Records to update. Up to 1000 per request."}},"required":["modelUuid","records"],"additionalProperties":false,"title":"Update records (bulk) body","description":"Shape: { modelUuid, records: [{ id, data }, ...] }. data is merged then id is applied under the model id column slug."}}}},"responses":{"200":{"description":"Update records (bulk)","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Updated records as returned by storage."}},"required":["records"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/records/remove":{"delete":{"operationId":"deleteStorageRecordsRemove","summary":"Remove record","description":"Remove a single row. Body: { modelUuid, id }. (DELETE /storage/records/remove).","tags":["Storage - Records"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Target model."},"id":{"type":"string","minLength":1,"title":"Record ID","description":"Record identifier; set on the payload under the model id column slug."}},"required":["modelUuid","id"],"additionalProperties":false,"title":"Remove record body","description":"Shape: { modelUuid, id }."}}}},"responses":{"200":{"description":"Remove record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","title":"Reason","description":"Failure reason from record.remove."}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"errorMessage":{"type":"string","title":"Error message","description":"Validation or unexpected error message."}},"required":["errorMessage"],"additionalProperties":false}],"title":"Remove record response","description":"Error response body schema (success is 204 with no body)."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/records/removeBulk":{"delete":{"operationId":"deleteStorageRecordsRemoveBulk","summary":"Remove records (bulk)","description":"Remove multiple rows in one call. Body: { modelUuid, ids: [string, ...] }. (DELETE /storage/records/removeBulk).","tags":["Storage - Records"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Target model."},"ids":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"title":"Record ID","description":"Record identifier; set on the payload under the model id column slug."},"title":"Record IDs","description":"Record identifiers to remove. Up to 1000 per request."}},"required":["modelUuid","ids"],"additionalProperties":false,"title":"Remove records (bulk) body","description":"Shape: { modelUuid, ids: [string, ...] }."}}}},"responses":{"200":{"description":"Remove records (bulk)","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","title":"Reason","description":"Failure reason from record.remove."}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"errorMessage":{"type":"string","title":"Error message","description":"Validation or unexpected error message."}},"required":["errorMessage"],"additionalProperties":false}],"title":"Remove records (bulk) response","description":"Error response body schema (success is 204 with no body)."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/query":{"post":{"operationId":"postStorageQuery","summary":"Execute SQL query","description":"Execute a read-only SELECT query against the workspace's storage warehouse. Tables must be referenced as [datasetSlug].[modelSlug] and are rewritten to the underlying warehouse table under the hood. (POST /storage/query).","tags":["Storage - Query"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":10000,"title":"SQL query","description":"A read-only SELECT statement. Tables must be referenced as [datasetSlug].[modelSlug] and are rewritten to the underlying warehouse table under the hood. Example: \"SELECT count() FROM my_dataset.my_model\""}},"required":["query"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Execute SQL query","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"isRefreshing":{"type":"boolean","title":"Is refreshing","description":"Whether a model refresh was still running, so very recent writes may be missing. Fetch again shortly for fresher data."},"rows":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Rows","description":"Result rows."}},"required":["isRefreshing","rows"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/query/download":{"post":{"operationId":"postStorageQueryDownload","summary":"Download SQL query results","description":"Execute a read-only SELECT query against the workspace's storage warehouse and download the results as a file. (POST /storage/query/download).","tags":["Storage - Query"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":10000,"title":"SQL query","description":"A read-only SELECT statement. Tables must be referenced as [datasetSlug].[modelSlug] and are rewritten to the underlying warehouse table under the hood. Example: \"SELECT * FROM my_dataset.my_model\""},"format":{"title":"Format","description":"Download format. Defaults to csv.","type":"string","enum":["csv","parquet"]}},"required":["query"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Download SQL query results","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"isRefreshing":{"type":"boolean","title":"Is refreshing","description":"Whether a model refresh was still running, so very recent writes may be missing. Fetch again shortly for fresher data."},"urls":{"type":"array","items":{"type":"string"},"title":"URLs","description":"Signed download URLs."}},"required":["isRefreshing","urls"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/relationships/list":{"get":{"operationId":"getStorageRelationshipsList","summary":"List relationships","description":"List all relationships in the workspace (GET /storage/relationships/list).","tags":["Storage - Relationships"],"parameters":[{"in":"query","name":"datasetUuid","schema":{"title":"Dataset UUID","description":"Filter relationships by dataset identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter relationships by dataset identifier."},{"in":"query","name":"modelUuid","schema":{"title":"Model UUID","description":"Filter relationships by model identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter relationships by model identifier."}],"responses":{"200":{"description":"List relationships","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"relationships":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Relationship identifier."},"workspaceUuid":{"type":"string","description":"Workspace this relationship belongs to."},"fromDatasetUuid":{"type":"string","description":"Dataset of the model on the from side of the join."},"fromModelUuid":{"type":"string","description":"Model on the from side of the join."},"fromColumnSlug":{"type":"string","description":"Column on the from model that holds the join key."},"fromPropertySlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON property on the from column to join on, if the column is an object or array."},"toDatasetUuid":{"type":"string","description":"Dataset of the model on the to side of the join."},"toModelUuid":{"type":"string","description":"Model on the to side of the join."},"toColumnSlug":{"type":"string","description":"Column on the to model that holds the join key."},"toPropertySlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON property on the to column to join on, if the column is an object or array."},"fromSelectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns from the from model that are selected when traversing this relationship, if limited."},"toSelectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns from the to model that are selected when traversing this relationship, if limited."},"relation":{"type":"string","enum":["oneToMany","oneToOne","manyToOne"],"description":"Cardinality of the join."}},"required":["uuid","workspaceUuid","fromDatasetUuid","fromModelUuid","fromColumnSlug","fromPropertySlug","toDatasetUuid","toModelUuid","toColumnSlug","toPropertySlug","fromSelectedColumnSlugs","toSelectedColumnSlugs","relation"],"additionalProperties":false},"title":"Relationships","description":"List of relationships."}},"required":["relationships"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/relationships/{uuid}":{"get":{"operationId":"getStorageRelationshipsByUuid","summary":"Get relationship","description":"Get a relationship by UUID (GET /storage/relationships/{uuid}).","tags":["Storage - Relationships"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Relationship identifier."},"required":true,"description":"Relationship identifier."}],"responses":{"200":{"description":"Get relationship","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"relationship":{"type":"object","properties":{"uuid":{"type":"string","description":"Relationship identifier."},"workspaceUuid":{"type":"string","description":"Workspace this relationship belongs to."},"fromDatasetUuid":{"type":"string","description":"Dataset of the model on the from side of the join."},"fromModelUuid":{"type":"string","description":"Model on the from side of the join."},"fromColumnSlug":{"type":"string","description":"Column on the from model that holds the join key."},"fromPropertySlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON property on the from column to join on, if the column is an object or array."},"toDatasetUuid":{"type":"string","description":"Dataset of the model on the to side of the join."},"toModelUuid":{"type":"string","description":"Model on the to side of the join."},"toColumnSlug":{"type":"string","description":"Column on the to model that holds the join key."},"toPropertySlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON property on the to column to join on, if the column is an object or array."},"fromSelectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns from the from model that are selected when traversing this relationship, if limited."},"toSelectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns from the to model that are selected when traversing this relationship, if limited."},"relation":{"type":"string","enum":["oneToMany","oneToOne","manyToOne"],"description":"Cardinality of the join."}},"required":["uuid","workspaceUuid","fromDatasetUuid","fromModelUuid","fromColumnSlug","fromPropertySlug","toDatasetUuid","toModelUuid","toColumnSlug","toPropertySlug","fromSelectedColumnSlugs","toSelectedColumnSlugs","relation"],"additionalProperties":false,"title":"Relationship","description":"Relationship details."}},"required":["relationship"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/relationships":{"post":{"operationId":"postStorageRelationships","summary":"Set relationship","description":"Set relationships between models within a connector dataset, or between native object models within the native dataset. Native unify models are not supported. (POST /storage/relationships).","tags":["Storage - Relationships"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"datasetUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Dataset UUID","description":"Dataset identifier."},"relationships":{"type":"array","items":{"type":"object","properties":{"fromModelUuid":{"type":"string","description":"Model on the from side of the join."},"fromColumnSlug":{"type":"string","description":"Column on the from model that holds the join key."},"fromPropertySlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON property on the from column to join on, if the column is an object or array."},"toModelUuid":{"type":"string","description":"Model on the to side of the join."},"toColumnSlug":{"type":"string","description":"Column on the to model that holds the join key."},"toPropertySlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON property on the to column to join on, if the column is an object or array."},"fromSelectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns from the from model that are selected when traversing this relationship, if limited."},"toSelectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns from the to model that are selected when traversing this relationship, if limited."},"relation":{"type":"string","enum":["oneToMany","oneToOne","manyToOne"],"description":"Cardinality of the join."},"uuid":{"title":"UUID","description":"Existing relationship identifier. Omit to create a new relationship.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["fromModelUuid","fromColumnSlug","fromPropertySlug","toModelUuid","toColumnSlug","toPropertySlug","fromSelectedColumnSlugs","toSelectedColumnSlugs","relation"]},"title":"Relationships","description":"Relationships to create or update."}},"required":["datasetUuid","relationships"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Set relationship","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"relationships":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Relationship identifier."},"workspaceUuid":{"type":"string","description":"Workspace this relationship belongs to."},"fromDatasetUuid":{"type":"string","description":"Dataset of the model on the from side of the join."},"fromModelUuid":{"type":"string","description":"Model on the from side of the join."},"fromColumnSlug":{"type":"string","description":"Column on the from model that holds the join key."},"fromPropertySlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON property on the from column to join on, if the column is an object or array."},"toDatasetUuid":{"type":"string","description":"Dataset of the model on the to side of the join."},"toModelUuid":{"type":"string","description":"Model on the to side of the join."},"toColumnSlug":{"type":"string","description":"Column on the to model that holds the join key."},"toPropertySlug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON property on the to column to join on, if the column is an object or array."},"fromSelectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns from the from model that are selected when traversing this relationship, if limited."},"toSelectedColumnSlugs":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Columns from the to model that are selected when traversing this relationship, if limited."},"relation":{"type":"string","enum":["oneToMany","oneToOne","manyToOne"],"description":"Cardinality of the join."}},"required":["uuid","workspaceUuid","fromDatasetUuid","fromModelUuid","fromColumnSlug","fromPropertySlug","toDatasetUuid","toModelUuid","toColumnSlug","toPropertySlug","fromSelectedColumnSlugs","toSelectedColumnSlugs","relation"],"additionalProperties":false},"title":"Relationships","description":"Updated relationships."}},"required":["relationships"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/runs/list":{"get":{"operationId":"getStorageRunsList","summary":"List runs","description":"List model sync runs (GET /storage/runs/list).","tags":["Storage - Runs"],"parameters":[{"in":"query","name":"modelUuid","schema":{"title":"Model UUID","description":"Filter runs by model identifier.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"Filter runs by model identifier."},{"in":"query","name":"statuses","schema":{"title":"Statuses","description":"Run statuses to include.","type":"array","items":{"type":"string","enum":["pending","running","success","error","cancelled","cancelling"]}},"description":"Run statuses to include."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of runs to return.","type":"string"},"description":"Maximum number of runs to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of runs to skip.","type":"string"},"description":"Number of runs to skip."}],"responses":{"200":{"description":"List runs","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Run identifier."},"workspaceUuid":{"type":"string","description":"Workspace this run belongs to."},"modelUuid":{"type":"string","description":"Model this run refreshes."},"status":{"type":"string","enum":["pending","running","cancelling","cancelled","error","success"],"description":"Current status of the run."},"temporalWorkflowId":{"type":"string","description":"Temporal workflow driving this run."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error raised by the run, if it failed."},"s3Filenames":{"type":"array","items":{"type":"string"},"description":"Object keys in S3 for this run's output files."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this run finished, if it has."},"createdAt":{"description":"Time this run was created.","type":"string"},"updatedAt":{"description":"Time this run was last updated.","type":"string"}},"required":["uuid","workspaceUuid","modelUuid","status","temporalWorkflowId","errorMessage","s3Filenames","finishedAt","createdAt","updatedAt"],"additionalProperties":false},"title":"Runs","description":"List of runs."}},"required":["runs"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/runs":{"post":{"operationId":"postStorageRuns","summary":"Create run","description":"Create a new model sync run (POST /storage/runs).","tags":["Storage - Runs"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Model UUID","description":"Model identifier."},"isReset":{"title":"Is reset","description":"Whether to reset the run.","type":"boolean"},"isForce":{"title":"Is force","description":"Whether to force the run.","type":"boolean"}},"required":["modelUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create run","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storage/runs/{uuid}/cancel":{"post":{"operationId":"postStorageRunsByUuidCancel","summary":"Cancel run","description":"Cancel a running model sync (POST /storage/runs/{uuid}/cancel).","tags":["Storage - Runs"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Run identifier."},"required":true,"description":"Run identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Cancel run","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/clients/list":{"get":{"operationId":"getSystemOfRecordIntegrationClientsList","summary":"List clients","description":"List all system of record clients (GET /systemOfRecordIntegration/clients/list).","tags":["System of Record Integration - Clients"],"responses":{"200":{"description":"List clients","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"clients":{"type":"array","items":{},"title":"Clients","description":"List of system-of-record client manifests."}},"required":["clients"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/clients/query":{"post":{"operationId":"postSystemOfRecordIntegrationClientsQuery","summary":"Query client","description":"Query data from a system of record client (POST /systemOfRecordIntegration/clients/query).","tags":["System of Record Integration - Clients"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","title":"Query","description":"Query to execute."}},"required":["query"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Query client","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Rows","description":"Query result rows."}},"required":["rows"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/clients/fetch":{"post":{"operationId":"postSystemOfRecordIntegrationClientsFetch","summary":"Fetch client data","description":"Fetch data from a system of record client (POST /systemOfRecordIntegration/clients/fetch).","tags":["System of Record Integration - Clients"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","title":"Query","description":"Query to fetch."},"limit":{"title":"Limit","description":"Maximum number of records to fetch.","type":"number"},"offset":{"title":"Offset","description":"Number of records to skip.","type":"number"}},"required":["query"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Fetch client data","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number","title":"Count","description":"Total number of records."},"records":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"title":"Records","description":"Fetched records."}},"required":["count","records"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/clients/download":{"post":{"operationId":"postSystemOfRecordIntegrationClientsDownload","summary":"Download client data","description":"Download data from a system of record client (POST /systemOfRecordIntegration/clients/download).","tags":["System of Record Integration - Clients"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","title":"Query","description":"Query to download."},"format":{"title":"Format","description":"Download format.","type":"string","enum":["csv","parquet"]}},"required":["query"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Download client data","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"},"title":"URLs","description":"Download URLs."}},"required":["urls"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/clients/{slug}/documentation":{"get":{"operationId":"getSystemOfRecordIntegrationClientsBySlugDocumentation","summary":"Get client documentation","description":"Get documentation for a system of record client (GET /systemOfRecordIntegration/clients/{slug}/documentation).","tags":["System of Record Integration - Clients"],"parameters":[{"in":"path","name":"slug","schema":{"type":"string","description":"Client slug"},"required":true,"description":"Client slug"}],"responses":{"200":{"description":"Get client documentation","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["documentationNotFound"],"title":"Reason","description":"Failure reason."}},"required":["reason"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/logs/list":{"get":{"operationId":"getSystemOfRecordIntegrationLogsList","summary":"List logs","description":"List system of record integration logs (GET /systemOfRecordIntegration/logs/list).","tags":["System of Record Integration - Logs"],"parameters":[{"in":"query","name":"statuses","schema":{"title":"Statuses","description":"Log statuses to include.","type":"array","items":{"type":"string","enum":["success","error"]}},"description":"Log statuses to include."},{"in":"query","name":"query","schema":{"title":"Query","description":"Search query for logs.","type":"string"},"description":"Search query for logs."},{"in":"query","name":"limit","schema":{"title":"Limit","description":"Maximum number of logs to return.","type":"string"},"description":"Maximum number of logs to return."},{"in":"query","name":"offset","schema":{"title":"Offset","description":"Number of logs to skip.","type":"string"},"description":"Number of logs to skip."}],"responses":{"200":{"description":"List logs","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"logs":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Query log identifier."},"workspaceUuid":{"type":"string","description":"Workspace this query was run in."},"systemOfRecordUuid":{"type":"string","description":"System of record this query was run against."},"query":{"type":"string","description":"SQL that was executed."},"status":{"type":"string","enum":["success","error"],"description":"Whether the query succeeded or failed."},"processedBytesCount":{"type":"number","description":"Bytes scanned while running this query."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the failed query, if any."},"startedAt":{"description":"Time this query started.","type":"string"},"finishedAt":{"description":"Time this query finished.","type":"string"},"createdAt":{"description":"Time this log entry was created.","type":"string"}},"required":["uuid","workspaceUuid","systemOfRecordUuid","query","status","processedBytesCount","errorMessage","startedAt","finishedAt","createdAt"],"additionalProperties":false},"title":"Logs","description":"List of logs."}},"required":["logs"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/logs/metrics":{"get":{"operationId":"getSystemOfRecordIntegrationLogsMetrics","summary":"Get log metrics","description":"Get metrics for system of record integration logs (GET /systemOfRecordIntegration/logs/metrics).","tags":["System of Record Integration - Logs"],"parameters":[{"in":"query","name":"from","schema":{"type":"string","title":"From","description":"Start of the time range."},"required":true,"description":"Start of the time range."},{"in":"query","name":"to","schema":{"type":"string","title":"To","description":"End of the time range."},"required":true,"description":"End of the time range."}],"responses":{"200":{"description":"Get log metrics","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"metrics":{"type":"array","items":{"type":"object","properties":{"date":{"description":"Day these usage totals cover.","type":"string"},"processedSecondsCount":{"type":"number","description":"Warehouse compute seconds used on this day."},"processedBytesCount":{"type":"number","description":"Bytes scanned on this day."},"queriesCount":{"type":"number","description":"Number of queries run on this day."}},"required":["date","processedSecondsCount","processedBytesCount","queriesCount"],"additionalProperties":false},"title":"Metrics","description":"Usage metrics."}},"required":["metrics"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/systemOfRecords":{"post":{"operationId":"postSystemOfRecordIntegrationSystemOfRecords","summary":"Create system of record","description":"Create a new system of record (POST /systemOfRecordIntegration/systemOfRecords).","tags":["System of Record Integration - Systems of Record"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["bigQuery","snowflake"],"title":"Kind","description":"System of record kind."},"config":{"title":"Config","description":"System of record configuration.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create system of record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"systemOfRecord":{"type":"object","properties":{"uuid":{"type":"string","description":"System of record identifier."},"workspaceUuid":{"type":"string","description":"Workspace this system of record belongs to."},"kind":{"type":"string","enum":["bigQuery","snowflake"],"description":"Warehouse this system of record is connected to."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connection settings for the warehouse."},"lastMigration":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Migration identifier."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this migration finished, if it has."},"createdAt":{"description":"Time this migration was created.","type":"string"},"status":{"type":"string","enum":["success","error","running"],"description":"Whether the migration is still running, succeeded, or failed."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the last failed migration, if any."}},"required":["uuid","finishedAt","createdAt","status","errorMessage"],"additionalProperties":false},{"type":"null"}],"description":"Most recent schema migration on this system of record, if any."},"cutover":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Cutover identifier."},"role":{"type":"string","enum":["source","target"],"description":"Whether this system of record is the source or the target of the cutover."},"sourceSystemOfRecordUuid":{"type":"string","description":"System of record data is being moved from."},"targetSystemOfRecordUuid":{"type":"string","description":"System of record data is being moved to."},"status":{"type":"string","enum":["running","success","error"],"description":"Whether the cutover is still running, succeeded, or failed."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the last failed cutover, if any."},"tablesTotal":{"type":"number","description":"Number of tables included in this cutover."},"tablesMigrated":{"type":"number","description":"Number of tables already moved in this cutover."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this cutover finished, if it has."},"createdAt":{"description":"Time this cutover was created.","type":"string"}},"required":["uuid","role","sourceSystemOfRecordUuid","targetSystemOfRecordUuid","status","errorMessage","tablesTotal","tablesMigrated","finishedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Active cutover this system of record is part of, if any."},"useCredits":{"type":"boolean","description":"Whether queries on this system of record consume workspace credits."},"isActive":{"type":"boolean","description":"Whether this is the workspace's currently active system of record."},"createdAt":{"description":"Time this system of record was created.","type":"string"},"updatedAt":{"description":"Time this system of record was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this system of record was deleted, if it has been."}},"required":["uuid","workspaceUuid","kind","config","lastMigration","cutover","useCredits","isActive","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"System of record","description":"Created system of record details."}},"required":["systemOfRecord"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"get":{"operationId":"getSystemOfRecordIntegrationSystemOfRecords","summary":"List systems of record","description":"List all systems of record (GET /systemOfRecordIntegration/systemOfRecords).","tags":["System of Record Integration - Systems of Record"],"responses":{"200":{"description":"List systems of record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"systemOfRecords":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"System of record identifier."},"workspaceUuid":{"type":"string","description":"Workspace this system of record belongs to."},"kind":{"type":"string","enum":["bigQuery","snowflake"],"description":"Warehouse this system of record is connected to."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connection settings for the warehouse."},"lastMigration":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Migration identifier."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this migration finished, if it has."},"createdAt":{"description":"Time this migration was created.","type":"string"},"status":{"type":"string","enum":["success","error","running"],"description":"Whether the migration is still running, succeeded, or failed."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the last failed migration, if any."}},"required":["uuid","finishedAt","createdAt","status","errorMessage"],"additionalProperties":false},{"type":"null"}],"description":"Most recent schema migration on this system of record, if any."},"cutover":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Cutover identifier."},"role":{"type":"string","enum":["source","target"],"description":"Whether this system of record is the source or the target of the cutover."},"sourceSystemOfRecordUuid":{"type":"string","description":"System of record data is being moved from."},"targetSystemOfRecordUuid":{"type":"string","description":"System of record data is being moved to."},"status":{"type":"string","enum":["running","success","error"],"description":"Whether the cutover is still running, succeeded, or failed."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the last failed cutover, if any."},"tablesTotal":{"type":"number","description":"Number of tables included in this cutover."},"tablesMigrated":{"type":"number","description":"Number of tables already moved in this cutover."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this cutover finished, if it has."},"createdAt":{"description":"Time this cutover was created.","type":"string"}},"required":["uuid","role","sourceSystemOfRecordUuid","targetSystemOfRecordUuid","status","errorMessage","tablesTotal","tablesMigrated","finishedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Active cutover this system of record is part of, if any."},"useCredits":{"type":"boolean","description":"Whether queries on this system of record consume workspace credits."},"isActive":{"type":"boolean","description":"Whether this is the workspace's currently active system of record."},"createdAt":{"description":"Time this system of record was created.","type":"string"},"updatedAt":{"description":"Time this system of record was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this system of record was deleted, if it has been."}},"required":["uuid","workspaceUuid","kind","config","lastMigration","cutover","useCredits","isActive","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"title":"System of record","description":"List of systems of record."}},"required":["systemOfRecords"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/systemOfRecords/{uuid}":{"get":{"operationId":"getSystemOfRecordIntegrationSystemOfRecordsByUuid","summary":"Get system of record","description":"Get a system of record by UUID (GET /systemOfRecordIntegration/systemOfRecords/{uuid}).","tags":["System of Record Integration - Systems of Record"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"System of record identifier."},"required":true,"description":"System of record identifier."}],"responses":{"200":{"description":"Get system of record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"systemOfRecord":{"type":"object","properties":{"uuid":{"type":"string","description":"System of record identifier."},"workspaceUuid":{"type":"string","description":"Workspace this system of record belongs to."},"kind":{"type":"string","enum":["bigQuery","snowflake"],"description":"Warehouse this system of record is connected to."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connection settings for the warehouse."},"lastMigration":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Migration identifier."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this migration finished, if it has."},"createdAt":{"description":"Time this migration was created.","type":"string"},"status":{"type":"string","enum":["success","error","running"],"description":"Whether the migration is still running, succeeded, or failed."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the last failed migration, if any."}},"required":["uuid","finishedAt","createdAt","status","errorMessage"],"additionalProperties":false},{"type":"null"}],"description":"Most recent schema migration on this system of record, if any."},"cutover":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Cutover identifier."},"role":{"type":"string","enum":["source","target"],"description":"Whether this system of record is the source or the target of the cutover."},"sourceSystemOfRecordUuid":{"type":"string","description":"System of record data is being moved from."},"targetSystemOfRecordUuid":{"type":"string","description":"System of record data is being moved to."},"status":{"type":"string","enum":["running","success","error"],"description":"Whether the cutover is still running, succeeded, or failed."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the last failed cutover, if any."},"tablesTotal":{"type":"number","description":"Number of tables included in this cutover."},"tablesMigrated":{"type":"number","description":"Number of tables already moved in this cutover."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this cutover finished, if it has."},"createdAt":{"description":"Time this cutover was created.","type":"string"}},"required":["uuid","role","sourceSystemOfRecordUuid","targetSystemOfRecordUuid","status","errorMessage","tablesTotal","tablesMigrated","finishedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Active cutover this system of record is part of, if any."},"useCredits":{"type":"boolean","description":"Whether queries on this system of record consume workspace credits."},"isActive":{"type":"boolean","description":"Whether this is the workspace's currently active system of record."},"createdAt":{"description":"Time this system of record was created.","type":"string"},"updatedAt":{"description":"Time this system of record was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this system of record was deleted, if it has been."}},"required":["uuid","workspaceUuid","kind","config","lastMigration","cutover","useCredits","isActive","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"System of record","description":"System of record details."}},"required":["systemOfRecord"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putSystemOfRecordIntegrationSystemOfRecordsByUuid","summary":"Update system of record","description":"Update a system of record (PUT /systemOfRecordIntegration/systemOfRecords/{uuid}).","tags":["System of Record Integration - Systems of Record"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"System of record identifier."},"required":true,"description":"System of record identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"title":"Config","description":"System of record configuration."}},"required":["config"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update system of record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"systemOfRecord":{"type":"object","properties":{"uuid":{"type":"string","description":"System of record identifier."},"workspaceUuid":{"type":"string","description":"Workspace this system of record belongs to."},"kind":{"type":"string","enum":["bigQuery","snowflake"],"description":"Warehouse this system of record is connected to."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connection settings for the warehouse."},"lastMigration":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Migration identifier."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this migration finished, if it has."},"createdAt":{"description":"Time this migration was created.","type":"string"},"status":{"type":"string","enum":["success","error","running"],"description":"Whether the migration is still running, succeeded, or failed."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the last failed migration, if any."}},"required":["uuid","finishedAt","createdAt","status","errorMessage"],"additionalProperties":false},{"type":"null"}],"description":"Most recent schema migration on this system of record, if any."},"cutover":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Cutover identifier."},"role":{"type":"string","enum":["source","target"],"description":"Whether this system of record is the source or the target of the cutover."},"sourceSystemOfRecordUuid":{"type":"string","description":"System of record data is being moved from."},"targetSystemOfRecordUuid":{"type":"string","description":"System of record data is being moved to."},"status":{"type":"string","enum":["running","success","error"],"description":"Whether the cutover is still running, succeeded, or failed."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the last failed cutover, if any."},"tablesTotal":{"type":"number","description":"Number of tables included in this cutover."},"tablesMigrated":{"type":"number","description":"Number of tables already moved in this cutover."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this cutover finished, if it has."},"createdAt":{"description":"Time this cutover was created.","type":"string"}},"required":["uuid","role","sourceSystemOfRecordUuid","targetSystemOfRecordUuid","status","errorMessage","tablesTotal","tablesMigrated","finishedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Active cutover this system of record is part of, if any."},"useCredits":{"type":"boolean","description":"Whether queries on this system of record consume workspace credits."},"isActive":{"type":"boolean","description":"Whether this is the workspace's currently active system of record."},"createdAt":{"description":"Time this system of record was created.","type":"string"},"updatedAt":{"description":"Time this system of record was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this system of record was deleted, if it has been."}},"required":["uuid","workspaceUuid","kind","config","lastMigration","cutover","useCredits","isActive","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"System of record","description":"Updated system of record details."}},"required":["systemOfRecord"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteSystemOfRecordIntegrationSystemOfRecordsByUuid","summary":"Remove system of record","description":"Remove a system of record (DELETE /systemOfRecordIntegration/systemOfRecords/{uuid}).","tags":["System of Record Integration - Systems of Record"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"System of record identifier."},"required":true,"description":"System of record identifier."}],"responses":{"200":{"description":"Remove system of record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"systemOfRecord":{"type":"object","properties":{"uuid":{"type":"string","description":"System of record identifier."},"workspaceUuid":{"type":"string","description":"Workspace this system of record belongs to."},"kind":{"type":"string","enum":["bigQuery","snowflake"],"description":"Warehouse this system of record is connected to."},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Connection settings for the warehouse."},"lastMigration":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Migration identifier."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this migration finished, if it has."},"createdAt":{"description":"Time this migration was created.","type":"string"},"status":{"type":"string","enum":["success","error","running"],"description":"Whether the migration is still running, succeeded, or failed."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the last failed migration, if any."}},"required":["uuid","finishedAt","createdAt","status","errorMessage"],"additionalProperties":false},{"type":"null"}],"description":"Most recent schema migration on this system of record, if any."},"cutover":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Cutover identifier."},"role":{"type":"string","enum":["source","target"],"description":"Whether this system of record is the source or the target of the cutover."},"sourceSystemOfRecordUuid":{"type":"string","description":"System of record data is being moved from."},"targetSystemOfRecordUuid":{"type":"string","description":"System of record data is being moved to."},"status":{"type":"string","enum":["running","success","error"],"description":"Whether the cutover is still running, succeeded, or failed."},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error from the last failed cutover, if any."},"tablesTotal":{"type":"number","description":"Number of tables included in this cutover."},"tablesMigrated":{"type":"number","description":"Number of tables already moved in this cutover."},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this cutover finished, if it has."},"createdAt":{"description":"Time this cutover was created.","type":"string"}},"required":["uuid","role","sourceSystemOfRecordUuid","targetSystemOfRecordUuid","status","errorMessage","tablesTotal","tablesMigrated","finishedAt","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Active cutover this system of record is part of, if any."},"useCredits":{"type":"boolean","description":"Whether queries on this system of record consume workspace credits."},"isActive":{"type":"boolean","description":"Whether this is the workspace's currently active system of record."},"createdAt":{"description":"Time this system of record was created.","type":"string"},"updatedAt":{"description":"Time this system of record was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this system of record was deleted, if it has been."}},"required":["uuid","workspaceUuid","kind","config","lastMigration","cutover","useCredits","isActive","createdAt","updatedAt","deletedAt"],"additionalProperties":false,"title":"System of record","description":"Removed system of record details."}},"required":["systemOfRecord"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/systemOfRecords/{uuid}/migrate":{"post":{"operationId":"postSystemOfRecordIntegrationSystemOfRecordsByUuidMigrate","summary":"Migrate system of record","description":"Migrate data to a system of record (POST /systemOfRecordIntegration/systemOfRecords/{uuid}/migrate).","tags":["System of Record Integration - Systems of Record"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"System of record identifier."},"required":true,"description":"System of record identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Migrate system of record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/systemOfRecordIntegration/systemOfRecords/{uuid}/cutover":{"post":{"operationId":"postSystemOfRecordIntegrationSystemOfRecordsByUuidCutover","summary":"Cutover system of record","description":"Perform cutover for a system of record (POST /systemOfRecordIntegration/systemOfRecords/{uuid}/cutover).","tags":["System of Record Integration - Systems of Record"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"System of record identifier."},"required":true,"description":"System of record identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Cutover system of record","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/userManagement/users/current":{"get":{"operationId":"getUserManagementUsersCurrent","summary":"Get current user","description":"Get the current authenticated user (GET /userManagement/users/current).","tags":["User Management - Users"],"responses":{"200":{"description":"Get current user","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"uuid":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"picture":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSignInAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"webExtensionData":{"anyOf":[{"type":"object","properties":{"linkedin":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"timezone":{"type":"string"},"edgesIdentityUid":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"pylonEmailHash":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["uuid","email","firstName","lastName","picture","lastSignInAt","createdAt","updatedAt","webExtensionData","pylonEmailHash"],"additionalProperties":false}},"required":["user"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putUserManagementUsersCurrent","summary":"Update current user","description":"Update the current authenticated user (PUT /userManagement/users/current).","tags":["User Management - Users"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"title":"First name","description":"User's first name.","type":"string"},"lastName":{"title":"Last name","description":"User's last name.","type":"string"},"webExtensionData":{"title":"Web extension data","description":"Chrome extension profile data for this user.","type":"object","properties":{"linkedin":{"title":"LinkedIn","description":"LinkedIn cookies or headers captured by the extension.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"timezone":{"title":"Timezone","description":"User timezone reported by the extension.","type":"string"}}}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update current user","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"uuid":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"picture":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSignInAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"webExtensionData":{"anyOf":[{"type":"object","properties":{"linkedin":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"timezone":{"type":"string"},"edgesIdentityUid":{"type":"string"}},"additionalProperties":false},{"type":"null"}]}},"required":["uuid","email","firstName","lastName","picture","lastSignInAt","createdAt","updatedAt","webExtensionData"],"additionalProperties":false}},"required":["user"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/files/fetch":{"get":{"operationId":"getWorkspaceManagementFilesFetch","summary":"Fetch file","description":"Fetch file data (GET /workspaceManagement/files/fetch).","tags":["Workspace Management - Files"],"parameters":[{"in":"query","name":"s3Filename","schema":{"type":"string","title":"S3 filename","description":"Object key in S3 for the file to fetch."},"required":true,"description":"Object key in S3 for the file to fetch."},{"in":"query","name":"token","schema":{"type":"string","title":"Token","description":"Access token that authorizes reading this file."},"required":true,"description":"Access token that authorizes reading this file."}],"responses":{"200":{"description":"Fetch file","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/files/listColumns":{"get":{"operationId":"getWorkspaceManagementFilesListColumns","summary":"List file columns","description":"List columns from a file (GET /workspaceManagement/files/listColumns).","tags":["Workspace Management - Files"],"parameters":[{"in":"query","name":"s3Filename","schema":{"type":"string","title":"S3 filename","description":"Object key in S3 of the file whose columns should be listed."},"required":true,"description":"Object key in S3 of the file whose columns should be listed."}],"responses":{"200":{"description":"List file columns","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"name":{"type":"string"}},"required":["type","name"],"additionalProperties":false}}},"required":["columns"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/files/upload":{"post":{"operationId":"postWorkspaceManagementFilesUpload","summary":"Upload file","description":"Upload a file to the workspace as multipart/form-data with a 'file' field (POST /workspaceManagement/files/upload).","tags":["Workspace Management - Files"],"responses":{"200":{"description":"Upload file","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"s3Filename":{"type":"string"},"contentType":{"type":"string"},"name":{"type":"string"}},"required":["s3Filename","contentType","name"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/files/multipart/create":{"post":{"operationId":"postWorkspaceManagementFilesMultipartCreate","summary":"Create multipart upload","description":"Start a direct-to-S3 multipart upload and return the target key and upload id (POST /workspaceManagement/files/multipart/create).","tags":["Workspace Management - Files"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentType":{"type":"string"},"filename":{"type":"string"}},"required":["contentType"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create multipart upload","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"s3Filename":{"type":"string"},"uploadId":{"type":"string"}},"required":["s3Filename","uploadId"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/files/multipart/sign":{"post":{"operationId":"postWorkspaceManagementFilesMultipartSign","summary":"Sign multipart upload part","description":"Return a presigned URL to upload a single part directly to S3 (POST /workspaceManagement/files/multipart/sign).","tags":["Workspace Management - Files"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"s3Filename":{"type":"string"},"uploadId":{"type":"string"},"partNumber":{"type":"integer","minimum":1,"maximum":10000}},"required":["s3Filename","uploadId","partNumber"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Sign multipart upload part","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/files/multipart/complete":{"post":{"operationId":"postWorkspaceManagementFilesMultipartComplete","summary":"Complete multipart upload","description":"Assemble the uploaded parts into the final S3 object (POST /workspaceManagement/files/multipart/complete).","tags":["Workspace Management - Files"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"s3Filename":{"type":"string"},"uploadId":{"type":"string"},"parts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":10000},"etag":{"type":"string"}},"required":["partNumber","etag"],"additionalProperties":false}}},"required":["s3Filename","uploadId","parts"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Complete multipart upload","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"s3Filename":{"type":"string"}},"required":["s3Filename"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/files/multipart/abort":{"post":{"operationId":"postWorkspaceManagementFilesMultipartAbort","summary":"Abort multipart upload","description":"Abort an in-progress multipart upload and discard its parts (POST /workspaceManagement/files/multipart/abort).","tags":["Workspace Management - Files"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"s3Filename":{"type":"string"},"uploadId":{"type":"string"}},"required":["s3Filename","uploadId"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Abort multipart upload","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/folders":{"post":{"operationId":"postWorkspaceManagementFolders","summary":"Create folder","description":"Create a new folder (POST /workspaceManagement/folders).","tags":["Workspace Management - Folders"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Folder name."},"emojiSlug":{"type":"string","minLength":1,"maxLength":32,"title":"Emoji slug","description":"Emoji shown next to the folder name."},"kind":{"type":"string","enum":["play","tool","agent","file","mcpServer","model","app","worker","alert","mailbox"],"title":"Kind","description":"Folder kind, such as file or play."},"parentUuid":{"title":"Parent UUID","description":"Parent folder identifier. Omit to create a root folder.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"}},"required":["name","emojiSlug","kind"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create folder","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"folder":{"type":"object","properties":{"uuid":{"type":"string","description":"Folder identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent folder this folder is nested under, if any."},"kind":{"type":"string","enum":["play","tool","agent","file","mcpServer","model","app","worker","alert","mailbox"],"description":"Kind of resources this folder holds."},"workspaceUuid":{"type":"string","description":"Workspace this folder belongs to."},"name":{"type":"string","description":"Folder display name."},"emojiSlug":{"type":"string","description":"Emoji used as this folder's icon."},"isReadOnly":{"type":"boolean","description":"Whether this folder cannot be renamed or removed."},"createdAt":{"description":"Time this folder was created.","type":"string"},"updatedAt":{"description":"Time this folder was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this folder was deleted, if it has been."}},"required":["uuid","parentUuid","kind","workspaceUuid","name","emojiSlug","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["folder"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/folders/list":{"get":{"operationId":"getWorkspaceManagementFoldersList","summary":"List folders","description":"List all folders (GET /workspaceManagement/folders/list).","tags":["Workspace Management - Folders"],"responses":{"200":{"description":"List folders","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"folders":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Folder identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent folder this folder is nested under, if any."},"kind":{"type":"string","enum":["play","tool","agent","file","mcpServer","model","app","worker","alert","mailbox"],"description":"Kind of resources this folder holds."},"workspaceUuid":{"type":"string","description":"Workspace this folder belongs to."},"name":{"type":"string","description":"Folder display name."},"emojiSlug":{"type":"string","description":"Emoji used as this folder's icon."},"isReadOnly":{"type":"boolean","description":"Whether this folder cannot be renamed or removed."},"createdAt":{"description":"Time this folder was created.","type":"string"},"updatedAt":{"description":"Time this folder was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this folder was deleted, if it has been."}},"required":["uuid","parentUuid","kind","workspaceUuid","name","emojiSlug","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}},"required":["folders"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/folders/{uuid}":{"get":{"operationId":"getWorkspaceManagementFoldersByUuid","summary":"Get folder","description":"Get a folder by UUID (GET /workspaceManagement/folders/{uuid}).","tags":["Workspace Management - Folders"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Folder identifier."},"required":true,"description":"Folder identifier."}],"responses":{"200":{"description":"Get folder","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"folder":{"type":"object","properties":{"uuid":{"type":"string","description":"Folder identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent folder this folder is nested under, if any."},"kind":{"type":"string","enum":["play","tool","agent","file","mcpServer","model","app","worker","alert","mailbox"],"description":"Kind of resources this folder holds."},"workspaceUuid":{"type":"string","description":"Workspace this folder belongs to."},"name":{"type":"string","description":"Folder display name."},"emojiSlug":{"type":"string","description":"Emoji used as this folder's icon."},"isReadOnly":{"type":"boolean","description":"Whether this folder cannot be renamed or removed."},"createdAt":{"description":"Time this folder was created.","type":"string"},"updatedAt":{"description":"Time this folder was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this folder was deleted, if it has been."}},"required":["uuid","parentUuid","kind","workspaceUuid","name","emojiSlug","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["folder"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putWorkspaceManagementFoldersByUuid","summary":"Update folder","description":"Update a folder (PUT /workspaceManagement/folders/{uuid}).","tags":["Workspace Management - Folders"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Folder identifier."},"required":true,"description":"Folder identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Folder name.","type":"string","minLength":1,"maxLength":255},"emojiSlug":{"title":"Emoji slug","description":"Emoji shown next to the folder name.","type":"string","minLength":1,"maxLength":32},"order":{"title":"Order","description":"Sort order among sibling folders.","type":"number"},"parentUuid":{"title":"Parent UUID","description":"Parent folder identifier. Pass null to move to the root.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update folder","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"folder":{"type":"object","properties":{"uuid":{"type":"string","description":"Folder identifier."},"parentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent folder this folder is nested under, if any."},"kind":{"type":"string","enum":["play","tool","agent","file","mcpServer","model","app","worker","alert","mailbox"],"description":"Kind of resources this folder holds."},"workspaceUuid":{"type":"string","description":"Workspace this folder belongs to."},"name":{"type":"string","description":"Folder display name."},"emojiSlug":{"type":"string","description":"Emoji used as this folder's icon."},"isReadOnly":{"type":"boolean","description":"Whether this folder cannot be renamed or removed."},"createdAt":{"description":"Time this folder was created.","type":"string"},"updatedAt":{"description":"Time this folder was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this folder was deleted, if it has been."}},"required":["uuid","parentUuid","kind","workspaceUuid","name","emojiSlug","isReadOnly","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["folder"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteWorkspaceManagementFoldersByUuid","summary":"Remove folder","description":"Remove a folder (DELETE /workspaceManagement/folders/{uuid}).","tags":["Workspace Management - Folders"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Folder identifier."},"required":true,"description":"Folder identifier."}],"responses":{"200":{"description":"Remove folder","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/roles":{"post":{"operationId":"postWorkspaceManagementRoles","summary":"Create role","description":"Create a custom role (POST /workspaceManagement/roles).","tags":["Workspace Management - Roles"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Display name for the role."},"slug":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Slug","description":"Unique snake_case identifier for the role."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"title":"Color","description":"Color shown as a dot next to the role name."},"description":{"type":"string","minLength":1,"maxLength":1000,"title":"Description","description":"Optional description shown next to the role name."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"]},"title":"Permissions","description":"Permission grants for the role."}},"required":["name","slug","color","permissions"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create role","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"object","properties":{"uuid":{"type":"string","description":"Role identifier."},"name":{"type":"string","description":"Role display name."},"slug":{"type":"string","description":"Stable slug for this role."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this role."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this role is for, if set."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Permission statements granted by this role."},"workspaceUuid":{"type":"string","description":"Workspace this role belongs to."},"createdAt":{"description":"Time this role was created.","type":"string"},"updatedAt":{"description":"Time this role was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this role was deleted, if it has been."}},"required":["uuid","name","slug","color","description","permissions","workspaceUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["role"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"get":{"operationId":"getWorkspaceManagementRoles","summary":"List roles","description":"List all roles (GET /workspaceManagement/roles).","tags":["Workspace Management - Roles"],"responses":{"200":{"description":"List roles","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Role identifier."},"name":{"type":"string","description":"Role display name."},"slug":{"type":"string","description":"Stable slug for this role."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this role."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this role is for, if set."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Permission statements granted by this role."},"workspaceUuid":{"type":"string","description":"Workspace this role belongs to."},"createdAt":{"description":"Time this role was created.","type":"string"},"updatedAt":{"description":"Time this role was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this role was deleted, if it has been."}},"required":["uuid","name","slug","color","description","permissions","workspaceUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}},"required":["roles"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/roles/list":{"get":{"operationId":"getWorkspaceManagementRolesList","summary":"List roles","description":"List all roles (GET /workspaceManagement/roles/list).","tags":["Workspace Management - Roles"],"responses":{"200":{"description":"List roles","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Role identifier."},"name":{"type":"string","description":"Role display name."},"slug":{"type":"string","description":"Stable slug for this role."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this role."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this role is for, if set."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Permission statements granted by this role."},"workspaceUuid":{"type":"string","description":"Workspace this role belongs to."},"createdAt":{"description":"Time this role was created.","type":"string"},"updatedAt":{"description":"Time this role was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this role was deleted, if it has been."}},"required":["uuid","name","slug","color","description","permissions","workspaceUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}},"required":["roles"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/roles/existsBySlug":{"get":{"operationId":"getWorkspaceManagementRolesExistsBySlug","summary":"Check role exists by slug","description":"Check if a role exists by its slug (GET /workspaceManagement/roles/existsBySlug).","tags":["Workspace Management - Roles"],"parameters":[{"in":"query","name":"slug","schema":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Slug","description":"Role slug to check."},"required":true,"description":"Role slug to check."}],"responses":{"200":{"description":"Check role exists by slug","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean","title":"Exists","description":"Whether the role exists."}},"required":["exists"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/roles/{uuid}":{"get":{"operationId":"getWorkspaceManagementRolesByUuid","summary":"Get role","description":"Get a role by UUID (GET /workspaceManagement/roles/{uuid}).","tags":["Workspace Management - Roles"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Role identifier."},"required":true,"description":"Role identifier."}],"responses":{"200":{"description":"Get role","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"object","properties":{"uuid":{"type":"string","description":"Role identifier."},"name":{"type":"string","description":"Role display name."},"slug":{"type":"string","description":"Stable slug for this role."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this role."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this role is for, if set."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Permission statements granted by this role."},"workspaceUuid":{"type":"string","description":"Workspace this role belongs to."},"createdAt":{"description":"Time this role was created.","type":"string"},"updatedAt":{"description":"Time this role was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this role was deleted, if it has been."}},"required":["uuid","name","slug","color","description","permissions","workspaceUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["role"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"patch":{"operationId":"patchWorkspaceManagementRolesByUuid","summary":"Update role","description":"Update a custom role's permissions (PATCH /workspaceManagement/roles/{uuid}).","tags":["Workspace Management - Roles"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Role identifier."},"required":true,"description":"Role identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Display name for the role."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"title":"Color","description":"Color shown as a dot next to the role name."},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000,"title":"Description","description":"Optional description shown next to the role name."},{"type":"null"}]},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"]},"title":"Permissions","description":"Permission grants for the role."}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update role","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"object","properties":{"uuid":{"type":"string","description":"Role identifier."},"name":{"type":"string","description":"Role display name."},"slug":{"type":"string","description":"Stable slug for this role."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this role."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this role is for, if set."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Permission statements granted by this role."},"workspaceUuid":{"type":"string","description":"Workspace this role belongs to."},"createdAt":{"description":"Time this role was created.","type":"string"},"updatedAt":{"description":"Time this role was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this role was deleted, if it has been."}},"required":["uuid","name","slug","color","description","permissions","workspaceUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["role"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteWorkspaceManagementRolesByUuid","summary":"Remove role","description":"Remove a custom role (DELETE /workspaceManagement/roles/{uuid}).","tags":["Workspace Management - Roles"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Role identifier."},"required":true,"description":"Role identifier."}],"responses":{"200":{"description":"Remove role","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/reports":{"post":{"operationId":"postWorkspaceManagementReports","summary":"Create report","description":"Submit a user report (feedback) for the current workspace (POST /workspaceManagement/reports).","tags":["Workspace Management - Reports"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1,"maxLength":1000}},"required":["title","description"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create report","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","properties":{"uuid":{"type":"string","description":"Report identifier."},"userUuid":{"type":"string","description":"User who created this report."},"workspaceUuid":{"type":"string","description":"Workspace this report belongs to."},"title":{"type":"string","description":"Report title."},"description":{"type":"string","description":"Report body."},"createdAt":{"description":"Time this report was created.","type":"string"}},"required":["uuid","userUuid","workspaceUuid","title","description","createdAt"],"additionalProperties":false}},"required":["report"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/sessions":{"post":{"operationId":"postWorkspaceManagementSessions","summary":"Upsert session","description":"Create or update a session (POST /workspaceManagement/sessions).","tags":["Workspace Management - Sessions"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1,"title":"Session ID","description":"Client-generated session identifier."},"title":{"type":"string","minLength":1,"maxLength":255,"title":"Title","description":"Session title."},"summary":{"type":"string","minLength":1,"maxLength":1000,"title":"Summary","description":"Short summary of the session."},"finishedAt":{"title":"Finished at","description":"When the session ended. Omit while the session is still open.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["sessionId","title","summary"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Upsert session","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"uuid":{"type":"string","description":"Session identifier."},"sessionId":{"type":"string","description":"External session identifier this row is keyed by."},"userUuid":{"type":"string","description":"User this session belongs to."},"workspaceUuid":{"type":"string","description":"Workspace this session belongs to."},"title":{"type":"string","description":"Session title."},"summary":{"type":"string","description":"Session summary."},"createdAt":{"description":"Time this session started.","type":"string"},"finishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this session ended, if it has."}},"required":["uuid","sessionId","userUuid","workspaceUuid","title","summary","createdAt","finishedAt"],"additionalProperties":false}},"required":["session"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/tokens":{"post":{"operationId":"postWorkspaceManagementTokens","summary":"Create token","description":"Create a new API token (POST /workspaceManagement/tokens).","tags":["Workspace Management - Tokens"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"title":"Name","description":"Token name."},"description":{"title":"Description","description":"Optional token description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"permissions":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"]}},{"type":"null"}],"title":"Permissions","description":"Permission grants for the token. Pass null for no extra grants."}},"required":["name","permissions"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create token","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"object","properties":{"uuid":{"type":"string","description":"API token identifier."},"token":{"type":"string","description":"Secret token value used to authenticate."},"name":{"type":"string","description":"Token display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this token is for, if set."},"permissions":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false}},{"type":"null"}],"description":"Permission statements this token is limited to, or null to inherit the user's."},"workspaceUuid":{"type":"string","description":"Workspace this token belongs to."},"userUuid":{"type":"string","description":"User this token authenticates as."},"createdAt":{"description":"Time this token was created.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this token was revoked, if it has been."}},"required":["uuid","token","name","description","permissions","workspaceUuid","userUuid","createdAt","deletedAt"],"additionalProperties":false}},"required":["token"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/tokens/list":{"get":{"operationId":"getWorkspaceManagementTokensList","summary":"List tokens","description":"List all API tokens (GET /workspaceManagement/tokens/list).","tags":["Workspace Management - Tokens"],"responses":{"200":{"description":"List tokens","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"API token identifier."},"token":{"type":"string","description":"Secret token value used to authenticate."},"name":{"type":"string","description":"Token display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this token is for, if set."},"permissions":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false}},{"type":"null"}],"description":"Permission statements this token is limited to, or null to inherit the user's."},"workspaceUuid":{"type":"string","description":"Workspace this token belongs to."},"userUuid":{"type":"string","description":"User this token authenticates as."},"createdAt":{"description":"Time this token was created.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this token was revoked, if it has been."}},"required":["uuid","token","name","description","permissions","workspaceUuid","userUuid","createdAt","deletedAt"],"additionalProperties":false}}},"required":["tokens"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/tokens/{uuid}":{"patch":{"operationId":"patchWorkspaceManagementTokensByUuid","summary":"Update token","description":"Update an API token (PATCH /workspaceManagement/tokens/{uuid}).","tags":["Workspace Management - Tokens"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Token identifier."},"required":true,"description":"Token identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"title":"Name","description":"Token name.","type":"string","minLength":1,"maxLength":255},"description":{"title":"Description","description":"Optional token description.","anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"permissions":{"title":"Permissions","description":"Permission grants for the token. Pass null for no extra grants.","anyOf":[{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"]}},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update token","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"object","properties":{"uuid":{"type":"string","description":"API token identifier."},"token":{"type":"string","description":"Secret token value used to authenticate."},"name":{"type":"string","description":"Token display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this token is for, if set."},"permissions":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false}},{"type":"null"}],"description":"Permission statements this token is limited to, or null to inherit the user's."},"workspaceUuid":{"type":"string","description":"Workspace this token belongs to."},"userUuid":{"type":"string","description":"User this token authenticates as."},"createdAt":{"description":"Time this token was created.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this token was revoked, if it has been."}},"required":["uuid","token","name","description","permissions","workspaceUuid","userUuid","createdAt","deletedAt"],"additionalProperties":false}},"required":["token"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteWorkspaceManagementTokensByUuid","summary":"Remove token","description":"Remove an API token (DELETE /workspaceManagement/tokens/{uuid}).","tags":["Workspace Management - Tokens"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"Token identifier."},"required":true,"description":"Token identifier."}],"responses":{"200":{"description":"Remove token","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/users":{"post":{"operationId":"postWorkspaceManagementUsers","summary":"Create user","description":"Create a new user in the workspace (POST /workspaceManagement/users).","tags":["Workspace Management - Users"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userEmail":{"type":"string","minLength":1,"maxLength":255,"title":"User email","description":"Email of the user to invite or add."},"roleSlug":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Role slug","description":"Role to assign to the user."}},"required":["userEmail","roleSlug"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create user","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"operationId":"deleteWorkspaceManagementUsers","summary":"Remove user","description":"Remove a user from the workspace (DELETE /workspaceManagement/users).","tags":["Workspace Management - Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"User UUID","description":"Identifier of the workspace user to remove."}},"required":["userUuid"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Remove user","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/users/list":{"get":{"operationId":"getWorkspaceManagementUsersList","summary":"List users","description":"List all users in the workspace (GET /workspaceManagement/users/list).","tags":["Workspace Management - Users"],"responses":{"200":{"description":"List users","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"User identifier."},"email":{"type":"string","description":"User email address."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User first name, if set."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User last name, if set."},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the user's profile picture."},"lastSignInAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the user last signed in, if they have."},"createdAt":{"description":"Time this user was created.","type":"string"},"workspaceUuid":{"type":"string","description":"Workspace this user belongs to."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Effective permission statements for this user in the workspace."},"role":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Role identifier."},"name":{"type":"string","description":"Role display name."},"slug":{"type":"string","description":"Stable slug for this role."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this role."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this role is for, if set."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Permission statements granted by this role."},"workspaceUuid":{"type":"string","description":"Workspace this role belongs to."},"createdAt":{"description":"Time this role was created.","type":"string"},"updatedAt":{"description":"Time this role was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this role was deleted, if it has been."}},"required":["uuid","name","slug","color","description","permissions","workspaceUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}],"description":"Role assigned to this user in the workspace, if any."}},"required":["uuid","email","firstName","lastName","picture","lastSignInAt","createdAt","workspaceUuid","permissions","role"],"additionalProperties":false}}},"required":["users"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/users/current":{"get":{"operationId":"getWorkspaceManagementUsersCurrent","summary":"Get current user","description":"Get the current user in the workspace (GET /workspaceManagement/users/current).","tags":["Workspace Management - Users"],"responses":{"200":{"description":"Get current user","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"uuid":{"type":"string","description":"User identifier."},"email":{"type":"string","description":"User email address."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User first name, if set."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User last name, if set."},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the user's profile picture."},"lastSignInAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the user last signed in, if they have."},"createdAt":{"description":"Time this user was created.","type":"string"},"workspaceUuid":{"type":"string","description":"Workspace this user belongs to."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Effective permission statements for this user in the workspace."},"role":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Role identifier."},"name":{"type":"string","description":"Role display name."},"slug":{"type":"string","description":"Stable slug for this role."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this role."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this role is for, if set."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Permission statements granted by this role."},"workspaceUuid":{"type":"string","description":"Workspace this role belongs to."},"createdAt":{"description":"Time this role was created.","type":"string"},"updatedAt":{"description":"Time this role was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this role was deleted, if it has been."}},"required":["uuid","name","slug","color","description","permissions","workspaceUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}],"description":"Role assigned to this user in the workspace, if any."}},"required":["uuid","email","firstName","lastName","picture","lastSignInAt","createdAt","workspaceUuid","permissions","role"],"additionalProperties":false}},"required":["user"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/users/{uuid}":{"put":{"operationId":"putWorkspaceManagementUsersByUuid","summary":"Update user","description":"Update a user (PUT /workspaceManagement/users/{uuid}).","tags":["Workspace Management - Users"],"parameters":[{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"UUID","description":"User identifier."},"required":true,"description":"User identifier."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roleSlug":{"title":"Role slug","description":"Role to assign to the user.","type":"string","minLength":1,"maxLength":63,"pattern":"^[a-z0-9]+(_[a-z0-9]+)*$"},"permissions":{"title":"Permissions","description":"Replacement permission grants for the user.","type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"]}}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update user","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"uuid":{"type":"string","description":"User identifier."},"email":{"type":"string","description":"User email address."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User first name, if set."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User last name, if set."},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the user's profile picture."},"lastSignInAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time the user last signed in, if they have."},"createdAt":{"description":"Time this user was created.","type":"string"},"workspaceUuid":{"type":"string","description":"Workspace this user belongs to."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Effective permission statements for this user in the workspace."},"role":{"anyOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Role identifier."},"name":{"type":"string","description":"Role display name."},"slug":{"type":"string","description":"Stable slug for this role."},"color":{"type":"string","enum":["orange","red","purple","green","yellow","grey"],"description":"Color used to tag this role."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What this role is for, if set."},"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false},"description":"Permission statements granted by this role."},"workspaceUuid":{"type":"string","description":"Workspace this role belongs to."},"createdAt":{"description":"Time this role was created.","type":"string"},"updatedAt":{"description":"Time this role was last updated.","type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Time this role was deleted, if it has been."}},"required":["uuid","name","slug","color","description","permissions","workspaceUuid","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}],"description":"Role assigned to this user in the workspace, if any."}},"required":["uuid","email","firstName","lastName","picture","lastSignInAt","createdAt","workspaceUuid","permissions","role"],"additionalProperties":false}},"required":["user"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/users/permissions":{"post":{"operationId":"postWorkspaceManagementUsersPermissions","summary":"Upsert user permissions","description":"Grant permissions on a resource to users (POST /workspaceManagement/users/permissions).","tags":["Workspace Management - Users"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"anyOf":[{"type":"object","properties":{"userUuids":{"type":"array","items":{"type":"string"},"title":"User UUIDs","description":"Users to grant the permission to."},"emails":{"title":"Emails","description":"Emails of users to grant the permission to. Creates workspace users as needed.","type":"array","items":{"type":"string"}}},"required":["userUuids"]},{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string"},"title":"Emails","description":"Emails of users to grant the permission to. Creates workspace users as needed."},"userUuids":{"title":"User UUIDs","description":"Users to grant the permission to.","type":"array","items":{"type":"string"}}},"required":["emails"]}]},{"type":"object","properties":{"action":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"],"title":"Action","description":"Permission action to grant."},"resourceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Resource UUID","description":"Resource the permission applies to."}},"required":["action","resourceUuid"]}],"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Upsert user permissions","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/users/{userUuid}/permissions":{"delete":{"operationId":"deleteWorkspaceManagementUsersByUserUuidPermissions","summary":"Remove user permission","description":"Remove a permission from a user (DELETE /workspaceManagement/users/{userUuid}/permissions).","tags":["Workspace Management - Users"],"parameters":[{"in":"path","name":"userUuid","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"User UUID","description":"User identifier."},"required":true,"description":"User identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceUuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$","title":"Resource UUID","description":"Resource the permission applies to."},"effect":{"type":"string","enum":["allow","deny"],"title":"Effect","description":"Whether to remove an allow or deny grant."}},"required":["resourceUuid","effect"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Remove user permission","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Whether this statement allows or denies the listed actions."},"resources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Resource identifiers this statement is scoped to, or null to apply to every resource."},"actions":{"type":"array","items":{"type":"string","enum":["ai:*","ai:read","ai:write","ai:agent:*","ai:agent:read","ai:agent:write","ai:mcpServer:*","ai:mcpServer:read","ai:mcpServer:write","billing:*","billing:read","billing:write","connection:*","connection:read","connection:write","context:*","context:read","context:write","domainManagement:*","domainManagement:read","domainManagement:write","hosting:*","hosting:read","hosting:write","hosting:app:*","hosting:app:read","hosting:app:write","hosting:worker:*","hosting:worker:read","hosting:worker:write","mailboxManagement:*","mailboxManagement:read","mailboxManagement:write","observability:*","observability:read","observability:write","orchestration:*","orchestration:read","orchestration:write","orchestration:workflow:*","orchestration:workflow:read","orchestration:workflow:write","revenueOrganization:*","revenueOrganization:read","revenueOrganization:write","segmentation:*","segmentation:read","segmentation:write","storage:*","storage:read","storage:write","content:*","content:read","content:write","content:file:*","content:file:read","content:file:write","systemOfRecordIntegration:*","systemOfRecordIntegration:read","systemOfRecordIntegration:write","workspaceManagement:*","workspaceManagement:read","workspaceManagement:write","workspaceManagement:folder:*","workspaceManagement:folder:read","workspaceManagement:folder:write"]},"description":"Permission actions this statement covers."}},"required":["effect","resources","actions"],"additionalProperties":false}}},"required":["permissions"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/workspaces":{"post":{"operationId":"postWorkspaceManagementWorkspaces","summary":"Create workspace","description":"Create a new workspace (POST /workspaceManagement/workspaces).","tags":["Workspace Management - Workspaces"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^<>]*$","title":"Name","description":"Display name for the workspace."},"logoBase64":{"title":"Logo","description":"Workspace logo as a base64-encoded image.","type":"string"},"metadata":{"title":"Metadata","description":"Optional signup metadata used for attribution.","type":"object","properties":{"referralSource":{"title":"Referral source","description":"How the workspace heard about Cargo.","type":"array","items":{"type":"string"}},"dubClickId":{"title":"Dub click ID","description":"Dub click identifier used to attribute the first workspace a user creates.","type":"string"}}}},"required":["name"],"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Create workspace","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"uuid":{"type":"string","description":"Workspace identifier."},"name":{"type":"string","description":"Workspace display name."},"allowedEmailDomains":{"type":"array","items":{"type":"string"},"description":"Email domains that may join this workspace."},"temporalNamespace":{"type":"string","description":"Temporal namespace used to run this workspace's workflows."},"temporalTaskQueuePrefix":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Prefix applied to this workspace's Temporal task queues, if set."},"openAiVectorStoreId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"OpenAI vector store used for this workspace's file retrieval, if any."},"syncs":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","enum":["connection","orchestration","revenueOrganization","storage","systemOfRecordIntegration","ai"],"description":"Workspace domain this sync schedule belongs to."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that runs this sync."},"cron":{"type":"string","description":"Cron expression for how often this sync runs."}},"required":["domain","temporalScheduleWorkflowId","cron"],"additionalProperties":false},"description":"Scheduled syncs that keep this workspace's domains up to date."},"createdAt":{"description":"Time this workspace was created.","type":"string"},"updatedAt":{"description":"Time this workspace was last updated.","type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the workspace logo, if set."},"metadata":{"anyOf":[{"type":"object","properties":{"mainGoal":{"description":"What the workspace said it wants to accomplish with Cargo.","type":"array","items":{"type":"string"}},"salesRepCount":{"description":"How many sales reps the workspace reported at signup.","type":"string"},"gtmStackList":{"description":"GTM tools the workspace reported using.","type":"array","items":{"type":"string"}},"referralSource":{"description":"How the workspace said it heard about Cargo.","type":"array","items":{"type":"string"}}},"additionalProperties":false},{"type":"null"}],"description":"Signup and onboarding answers stored on this workspace, if any."},"chromeExtensionMasterAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default agent the Chrome extension runs in this workspace, if set."},"chromeExtensionAvailableAgentUuids":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Agents the Chrome extension may run in this workspace, if restricted."},"defaultRoleUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Role assigned to new workspace members, if set."},"allowedLoginProviders":{"anyOf":[{"type":"array","items":{"type":"string","enum":["email","google-oauth2","azuread","okta"]}},{"type":"null"}],"description":"Sign-in methods this workspace allows, or null to allow all."},"ssoIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"SSO connection identifier for this workspace, if SSO is configured."},"quotaBuckets":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Per-bucket quota overrides for this workspace."}},"required":["uuid","name","allowedEmailDomains","temporalNamespace","temporalTaskQueuePrefix","openAiVectorStoreId","syncs","createdAt","updatedAt","logoUrl","metadata","chromeExtensionMasterAgentUuid","chromeExtensionAvailableAgentUuids","defaultRoleUuid","allowedLoginProviders","ssoIdentifier","quotaBuckets"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/workspaces/list":{"get":{"operationId":"getWorkspaceManagementWorkspacesList","summary":"List workspaces","description":"List all workspaces (GET /workspaceManagement/workspaces/list).","tags":["Workspace Management - Workspaces"],"responses":{"200":{"description":"List workspaces","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"Workspace identifier."},"name":{"type":"string","description":"Workspace display name."},"allowedEmailDomains":{"type":"array","items":{"type":"string"},"description":"Email domains that may join this workspace."},"temporalNamespace":{"type":"string","description":"Temporal namespace used to run this workspace's workflows."},"temporalTaskQueuePrefix":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Prefix applied to this workspace's Temporal task queues, if set."},"openAiVectorStoreId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"OpenAI vector store used for this workspace's file retrieval, if any."},"syncs":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","enum":["connection","orchestration","revenueOrganization","storage","systemOfRecordIntegration","ai"],"description":"Workspace domain this sync schedule belongs to."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that runs this sync."},"cron":{"type":"string","description":"Cron expression for how often this sync runs."}},"required":["domain","temporalScheduleWorkflowId","cron"],"additionalProperties":false},"description":"Scheduled syncs that keep this workspace's domains up to date."},"createdAt":{"description":"Time this workspace was created.","type":"string"},"updatedAt":{"description":"Time this workspace was last updated.","type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the workspace logo, if set."},"metadata":{"anyOf":[{"type":"object","properties":{"mainGoal":{"description":"What the workspace said it wants to accomplish with Cargo.","type":"array","items":{"type":"string"}},"salesRepCount":{"description":"How many sales reps the workspace reported at signup.","type":"string"},"gtmStackList":{"description":"GTM tools the workspace reported using.","type":"array","items":{"type":"string"}},"referralSource":{"description":"How the workspace said it heard about Cargo.","type":"array","items":{"type":"string"}}},"additionalProperties":false},{"type":"null"}],"description":"Signup and onboarding answers stored on this workspace, if any."},"chromeExtensionMasterAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default agent the Chrome extension runs in this workspace, if set."},"chromeExtensionAvailableAgentUuids":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Agents the Chrome extension may run in this workspace, if restricted."},"defaultRoleUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Role assigned to new workspace members, if set."},"allowedLoginProviders":{"anyOf":[{"type":"array","items":{"type":"string","enum":["email","google-oauth2","azuread","okta"]}},{"type":"null"}],"description":"Sign-in methods this workspace allows, or null to allow all."},"ssoIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"SSO connection identifier for this workspace, if SSO is configured."},"quotaBuckets":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Per-bucket quota overrides for this workspace."}},"required":["uuid","name","allowedEmailDomains","temporalNamespace","temporalTaskQueuePrefix","openAiVectorStoreId","syncs","createdAt","updatedAt","logoUrl","metadata","chromeExtensionMasterAgentUuid","chromeExtensionAvailableAgentUuids","defaultRoleUuid","allowedLoginProviders","ssoIdentifier","quotaBuckets"],"additionalProperties":false}}},"required":["workspaces"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/workspaces/loginProviders":{"get":{"operationId":"getWorkspaceManagementWorkspacesLoginProviders","summary":"Get workspace login providers","description":"Get the login providers for a workspace (GET /workspaceManagement/workspaces/loginProviders).","tags":["Workspace Management - Workspaces"],"parameters":[{"in":"query","name":"email","schema":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","title":"Email","description":"Email address whose allowed login providers should be returned."},"required":true,"description":"Email address whose allowed login providers should be returned."}],"responses":{"200":{"description":"Get workspace login providers","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"allowedProviders":{"anyOf":[{"type":"array","items":{"type":"string","enum":["email","google-oauth2","azuread","okta"]}},{"type":"null"}]},"ssoIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["allowedProviders","ssoIdentifier"],"additionalProperties":false,"title":"Response body","description":"Response body schema."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/workspaceManagement/workspaces/current":{"get":{"operationId":"getWorkspaceManagementWorkspacesCurrent","summary":"Get current workspace","description":"Get the current workspace (GET /workspaceManagement/workspaces/current).","tags":["Workspace Management - Workspaces"],"responses":{"200":{"description":"Get current workspace","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"uuid":{"type":"string","description":"Workspace identifier."},"name":{"type":"string","description":"Workspace display name."},"allowedEmailDomains":{"type":"array","items":{"type":"string"},"description":"Email domains that may join this workspace."},"temporalNamespace":{"type":"string","description":"Temporal namespace used to run this workspace's workflows."},"temporalTaskQueuePrefix":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Prefix applied to this workspace's Temporal task queues, if set."},"openAiVectorStoreId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"OpenAI vector store used for this workspace's file retrieval, if any."},"syncs":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","enum":["connection","orchestration","revenueOrganization","storage","systemOfRecordIntegration","ai"],"description":"Workspace domain this sync schedule belongs to."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that runs this sync."},"cron":{"type":"string","description":"Cron expression for how often this sync runs."}},"required":["domain","temporalScheduleWorkflowId","cron"],"additionalProperties":false},"description":"Scheduled syncs that keep this workspace's domains up to date."},"createdAt":{"description":"Time this workspace was created.","type":"string"},"updatedAt":{"description":"Time this workspace was last updated.","type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the workspace logo, if set."},"metadata":{"anyOf":[{"type":"object","properties":{"mainGoal":{"description":"What the workspace said it wants to accomplish with Cargo.","type":"array","items":{"type":"string"}},"salesRepCount":{"description":"How many sales reps the workspace reported at signup.","type":"string"},"gtmStackList":{"description":"GTM tools the workspace reported using.","type":"array","items":{"type":"string"}},"referralSource":{"description":"How the workspace said it heard about Cargo.","type":"array","items":{"type":"string"}}},"additionalProperties":false},{"type":"null"}],"description":"Signup and onboarding answers stored on this workspace, if any."},"chromeExtensionMasterAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default agent the Chrome extension runs in this workspace, if set."},"chromeExtensionAvailableAgentUuids":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Agents the Chrome extension may run in this workspace, if restricted."},"defaultRoleUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Role assigned to new workspace members, if set."},"allowedLoginProviders":{"anyOf":[{"type":"array","items":{"type":"string","enum":["email","google-oauth2","azuread","okta"]}},{"type":"null"}],"description":"Sign-in methods this workspace allows, or null to allow all."},"ssoIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"SSO connection identifier for this workspace, if SSO is configured."},"quotaBuckets":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Per-bucket quota overrides for this workspace."}},"required":["uuid","name","allowedEmailDomains","temporalNamespace","temporalTaskQueuePrefix","openAiVectorStoreId","syncs","createdAt","updatedAt","logoUrl","metadata","chromeExtensionMasterAgentUuid","chromeExtensionAvailableAgentUuids","defaultRoleUuid","allowedLoginProviders","ssoIdentifier","quotaBuckets"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"put":{"operationId":"putWorkspaceManagementWorkspacesCurrent","summary":"Update current workspace","description":"Update the current workspace (PUT /workspaceManagement/workspaces/current).","tags":["Workspace Management - Workspaces"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"syncs":{"title":"Syncs","description":"Recurring sync schedules for workspace domains.","type":"array","items":{"type":"object","properties":{"domain":{"type":"string","enum":["revenueOrganization","storage","systemOfRecordIntegration","ai"],"title":"Domain","description":"Workspace domain whose sync schedule to set."},"cron":{"type":"string","title":"Cron","description":"Cron expression for that domain's sync."}},"required":["domain","cron"]}},"name":{"title":"Name","description":"Display name for the workspace.","type":"string","minLength":1,"maxLength":255,"pattern":"^[^<>]*$"},"allowedEmailDomains":{"title":"Allowed email domains","description":"Email domains allowed to join this workspace.","type":"array","items":{"type":"string"}},"logoBase64":{"title":"Logo","description":"Workspace logo as a base64-encoded image. Pass null to remove.","anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"title":"Metadata","description":"Workspace onboarding metadata.","type":"object","properties":{"mainGoal":{"title":"Main goal","description":"What the workspace aims to accomplish with Cargo.","type":"array","items":{"type":"string"}},"salesRepCount":{"title":"Sales rep count","description":"Approximate number of sales reps in the workspace.","type":"string"},"gtmStackList":{"title":"GTM stack","description":"Tools in the workspace's GTM stack.","type":"array","items":{"type":"string"}},"referralSource":{"title":"Referral source","description":"How the workspace heard about Cargo.","type":"array","items":{"type":"string"}}}},"chromeExtensionMasterAgentUuid":{"title":"Chrome extension master agent UUID","description":"Agent the Chrome extension uses as the default. Pass null to clear.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"chromeExtensionAvailableAgentUuids":{"title":"Chrome extension available agent UUIDs","description":"Agents the Chrome extension may offer. Pass null to clear.","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"defaultRoleUuid":{"title":"Default role UUID","description":"Role assigned to new workspace members. Pass null to use admin.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"allowedLoginProviders":{"title":"Allowed login providers","description":"Login providers members may use. Pass null to allow all.","anyOf":[{"type":"array","items":{"type":"string","enum":["email","google-oauth2","azuread","okta"]}},{"type":"null"}]}},"additionalProperties":false,"title":"Request body","description":"Request body schema."}}}},"responses":{"200":{"description":"Update current workspace","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"uuid":{"type":"string","description":"Workspace identifier."},"name":{"type":"string","description":"Workspace display name."},"allowedEmailDomains":{"type":"array","items":{"type":"string"},"description":"Email domains that may join this workspace."},"temporalNamespace":{"type":"string","description":"Temporal namespace used to run this workspace's workflows."},"temporalTaskQueuePrefix":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Prefix applied to this workspace's Temporal task queues, if set."},"openAiVectorStoreId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"OpenAI vector store used for this workspace's file retrieval, if any."},"syncs":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","enum":["connection","orchestration","revenueOrganization","storage","systemOfRecordIntegration","ai"],"description":"Workspace domain this sync schedule belongs to."},"temporalScheduleWorkflowId":{"type":"string","description":"Temporal schedule workflow that runs this sync."},"cron":{"type":"string","description":"Cron expression for how often this sync runs."}},"required":["domain","temporalScheduleWorkflowId","cron"],"additionalProperties":false},"description":"Scheduled syncs that keep this workspace's domains up to date."},"createdAt":{"description":"Time this workspace was created.","type":"string"},"updatedAt":{"description":"Time this workspace was last updated.","type":"string"},"logoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the workspace logo, if set."},"metadata":{"anyOf":[{"type":"object","properties":{"mainGoal":{"description":"What the workspace said it wants to accomplish with Cargo.","type":"array","items":{"type":"string"}},"salesRepCount":{"description":"How many sales reps the workspace reported at signup.","type":"string"},"gtmStackList":{"description":"GTM tools the workspace reported using.","type":"array","items":{"type":"string"}},"referralSource":{"description":"How the workspace said it heard about Cargo.","type":"array","items":{"type":"string"}}},"additionalProperties":false},{"type":"null"}],"description":"Signup and onboarding answers stored on this workspace, if any."},"chromeExtensionMasterAgentUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default agent the Chrome extension runs in this workspace, if set."},"chromeExtensionAvailableAgentUuids":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Agents the Chrome extension may run in this workspace, if restricted."},"defaultRoleUuid":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Role assigned to new workspace members, if set."},"allowedLoginProviders":{"anyOf":[{"type":"array","items":{"type":"string","enum":["email","google-oauth2","azuread","okta"]}},{"type":"null"}],"description":"Sign-in methods this workspace allows, or null to allow all."},"ssoIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"SSO connection identifier for this workspace, if SSO is configured."},"quotaBuckets":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Per-bucket quota overrides for this workspace."}},"required":["uuid","name","allowedEmailDomains","temporalNamespace","temporalTaskQueuePrefix","openAiVectorStoreId","syncs","createdAt","updatedAt","logoUrl","metadata","chromeExtensionMasterAgentUuid","chromeExtensionAvailableAgentUuids","defaultRoleUuid","allowedLoginProviders","ssoIdentifier","quotaBuckets"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"schemas":{"WorkflowNode":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Node identifier."},"slug":{"type":"string","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"description":{"description":"What this node does, if set.","type":"string"},"nodes":{"description":"Nested child nodes.","type":"array","items":{"$ref":"#/components/schemas/WorkflowNode"}},"isArchived":{"type":"boolean","description":"Whether this node has been archived."}},"required":["uuid","slug","nodes","isArchived"]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Node runs a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","description":"Node calls a connector integration.","enum":["connector"]},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"]},{"type":"object","properties":{"kind":{"type":"string","description":"Node invokes a workspace tool.","enum":["tool"]},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","description":"Node invokes an agent.","enum":["agent"]},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","description":"Node calls a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."}},"required":["kind","workerUuid","method","path"]}]}]},"Error":{"type":"object","properties":{"errorMessage":{"description":"Human-readable description of what went wrong.","type":"string"},"reason":{"description":"Machine-readable cause, used where a route distinguishes failure modes.","type":"string"}},"additionalProperties":false,"description":"Error response"},"InvalidNode":{"type":"object","properties":{"node":{"type":"object","properties":{"uuid":{"type":"string"},"slug":{"type":"string"}},"required":["uuid","slug"],"additionalProperties":false},"reason":{"type":"string"},"invalidNodes":{"type":"array","items":{"$ref":"#/components/schemas/InvalidNode"}}},"required":["node","reason"],"additionalProperties":false},"WorkflowNodeOutput":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","description":"Node identifier."},"slug":{"type":"string","description":"Stable slug for this node."},"name":{"description":"Node display name, if set.","type":"string"},"description":{"description":"What this node does, if set.","type":"string"},"nodes":{"description":"Nested child nodes.","type":"array","items":{"$ref":"#/components/schemas/WorkflowNodeOutput"}},"isArchived":{"type":"boolean","description":"Whether this node has been archived."}},"required":["uuid","slug","nodes","isArchived"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","description":"Node runs a built-in Cargo action.","enum":["native"]},"actionSlug":{"type":"string","description":"Slug of the native action to run."}},"required":["kind","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Node calls a connector integration.","enum":["connector"]},"connectorUuid":{"description":"Connector to call, if bound.","type":"string"},"integrationSlug":{"type":"string","description":"Integration that defines this action."},"actionSlug":{"type":"string","description":"Slug of the connector action to run."}},"required":["kind","integrationSlug","actionSlug"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Node invokes a workspace tool.","enum":["tool"]},"toolUuid":{"description":"Tool to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this tool was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific tool release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the tool to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Node invokes an agent.","enum":["agent"]},"agentUuid":{"description":"Agent to invoke, if bound.","type":"string"},"templateSlug":{"description":"Template this agent was created from, if any.","type":"string"},"releaseUuid":{"description":"Specific agent release to run, if pinned.","type":"string"},"waitUntilFinished":{"description":"Whether the parent waits for the agent to finish.","type":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","description":"Node calls a hosted worker.","enum":["worker"]},"workerUuid":{"type":"string","description":"Worker that handles this request."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"description":"HTTP method used to call the worker."},"path":{"type":"string","description":"Path on the worker to call."}},"required":["kind","workerUuid","method","path"],"additionalProperties":false}]}]}},"headers":{"Deprecation":{"description":"RFC 9745. Present only when this operation is deprecated. HTTP-date of when deprecation began. See https://docs.getcargo.ai/api-reference/versioning.","schema":{"type":"string","example":"Sat, 01 Aug 2026 00:00:00 GMT"}},"Sunset":{"description":"RFC 8594. Present once a removal date is fixed. HTTP-date of when the operation will stop being served. At least 180 days after Deprecation. See https://docs.getcargo.ai/api-reference/versioning.","schema":{"type":"string","example":"Thu, 28 Jan 2027 00:00:00 GMT"}}},"responses":{"BadRequest":{"description":"Bad request","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Unauthorized","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not found","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"A request with this Idempotency-Key is already in progress.","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"Idempotency-Key was reused with a different request.","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too many requests. Retry after the number of seconds in the Retry-After header.","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal server error","headers":{"RateLimit":{"description":"Current quota under the workspace policy, as `\"workspace\";r=<remaining>;t=<window seconds>`.","schema":{"type":"string","example":"\"workspace\";r=999;t=60"}},"RateLimit-Limit":{"description":"Maximum requests allowed in the current window.","schema":{"type":"integer","example":1000}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","example":999}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","example":60}},"RateLimit-Policy":{"description":"Declared policy as `<limit>;w=<window seconds>`.","schema":{"type":"string","example":"1000;w=60"}},"X-RateLimit-Limit":{"description":"Legacy spelling of RateLimit-Limit.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Legacy spelling of RateLimit-Remaining.","schema":{"type":"integer","example":999}},"X-RateLimit-Reset":{"description":"Legacy spelling of RateLimit-Reset.","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":{"IdempotencyKey":{"in":"header","name":"Idempotency-Key","schema":{"description":"Client-generated key that makes this write safe to retry. Reusing the same key with the same request returns the original response instead of creating a second record. Reusing it with a different request returns 422. A concurrent retry while the first request is still running returns 409. Keys expire after 24 hours. Not accepted on multipart file uploads. Optional: a request without one is processed as it always was.","example":"8e03978e-40d5-43e8-bc93-6894a57f9324","type":"string","maxLength":255},"description":"Client-generated key that makes this write safe to retry. Reusing the same key with the same request returns the original response instead of creating a second record. Reusing it with a different request returns 422. A concurrent retry while the first request is still running returns 409. Keys expire after 24 hours. Not accepted on multipart file uploads. Optional: a request without one is processed as it always was."}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API token from `cargo-ai login`. Send as `Authorization: Bearer <token>`."},"oauth2":{"type":"oauth2","description":"OAuth 2.0 authorization code with PKCE (S256). Discover endpoints from https://getcargo.eu.auth0.com/.well-known/oauth-authorization-server. Include `audience=https://api.getcargo.io` in the authorization request to obtain a JWT valid for this API.","flows":{"authorizationCode":{"authorizationUrl":"https://getcargo.eu.auth0.com/authorize","tokenUrl":"https://getcargo.eu.auth0.com/oauth/token","scopes":{"openid":"OpenID Connect identity.","profile":"Name and profile claims.","email":"Email address.","offline_access":"Refresh token."}}}}}}}