{
  "components": {
    "schemas": {
      "Error": {
        "properties": {
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "type": "object"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "type": "object"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Success": {
        "properties": {
          "data": {},
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "description": "API key adbk.<key_id>.<secret> (signup, agentdb login)",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.agentdb.link/oauth/authorize",
            "refreshUrl": "https://app.agentdb.link/oauth/token",
            "scopes": {
              "agentdb": "Access the workspaces you approve"
            },
            "tokenUrl": "https://app.agentdb.link/oauth/token"
          }
        },
        "type": "oauth2"
      },
      "sessionCookie": {
        "description": "Explorer browser session (email sign-in at /app/sign-in); read-only",
        "in": "cookie",
        "name": "__Host-agentdb_s",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Agent-native persistent data: typed objects, records, relationships, files, imports and exact queries. Beta: synthetic or non-sensitive data only. MCP: /mcp.",
    "title": "AgentDB API",
    "version": "1.0.0-rc.13"
  },
  "openapi": "3.1.0",
  "paths": {
    "/app/dashboard-access": {
      "get": {
        "operationId": "app.dashboard_sites.access",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "The owner, an admin or the creator opens a custom dashboard or a preview (?preview=<version>) with a single-use code",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/d/{dashboard}": {
      "get": {
        "operationId": "dashboards.page",
        "parameters": [
          {
            "in": "path",
            "name": "dashboard",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Hosted dashboard page (/d/<id>#<token>; the token stays in the URL fragment)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/account/workspaces": {
      "get": {
        "operationId": "workspaces.list",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Workspaces this key can use",
        "tags": [
          "workspaces"
        ],
        "x-agentdb-category": "workspaces",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "workspaces.create",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Create a workspace (account key)",
        "tags": [
          "workspaces"
        ],
        "x-agentdb-category": "workspaces",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/app/account-link/confirm": {
      "post": {
        "operationId": "app.account_link.confirm",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Use an emailed link: verify the address, set the password or change the address",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account-link/peek": {
      "get": {
        "operationId": "app.account_link.peek",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "What an emailed account link does and the masked address (does not use the link)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/email": {
      "post": {
        "operationId": "app.account.email",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Change the email address; the new address confirms and the old address approves, both by link (x-csrf-token)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/key-review": {
      "get": {
        "operationId": "app.account.key_review",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Keys and connected apps created before the address was proven, waiting for keep or revoke",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "app.account.key_review.decide",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Keep or revoke keys and connected apps from before the address was proven (decisions, or revoke_all) (x-csrf-token)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/keys": {
      "get": {
        "operationId": "app.account.keys.list",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Live account API keys of the signed-in account: label, prefix (never the secret), created, last used, created via, reach (browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "app.account.keys.create",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Create an account API key, shown once (label required; second factor when 2FA is on)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/keys/{key}/revoke": {
      "post": {
        "operationId": "app.account.keys.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke one account API key of the signed-in account (Origin + x-csrf-token + recent sign-in; second factor when 2FA is on)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/passkeys": {
      "post": {
        "operationId": "app.account.passkeys.add",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Add a passkey; the first factor returns 10 recovery codes once",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/passkeys/options": {
      "post": {
        "operationId": "app.account.passkeys.options",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "WebAuthn registration options for a new passkey (single-use challenge; needs the same proof as authenticator setup)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/passkeys/{passkey}/remove": {
      "post": {
        "operationId": "app.account.passkeys.remove",
        "parameters": [
          {
            "in": "path",
            "name": "passkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Remove a passkey (needs a current second factor)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/passkeys/{passkey}/rename": {
      "post": {
        "operationId": "app.account.passkeys.rename",
        "parameters": [
          {
            "in": "path",
            "name": "passkey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Rename a passkey (needs a current second factor)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/password": {
      "post": {
        "operationId": "app.account.password",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Change the password (needs the current one) or set a first password (confirmed by email) (x-csrf-token)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/recovery-codes": {
      "post": {
        "operationId": "app.account.recovery_codes",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Replace the recovery codes; the new 10 are shown once (needs a current second factor)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/security": {
      "get": {
        "operationId": "app.account.security",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Second-factor status, passkeys and recovery codes left (no secrets)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/totp/disable": {
      "post": {
        "operationId": "app.account.totp.disable",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Remove the authenticator app (needs a current second factor)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/totp/enable": {
      "post": {
        "operationId": "app.account.totp.enable",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Turn the authenticator app on with one valid code; the first factor returns 10 recovery codes once",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/totp/setup": {
      "post": {
        "operationId": "app.account.totp.setup",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Start authenticator-app setup: secret, otpauth URI and QR code (x-csrf-token, recent sign-in; a second factor, or the current password before the first one)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/two-step/email-confirm": {
      "post": {
        "operationId": "app.account.two_step.email_confirm",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Account without a password: email the link that confirms adding the first second factor",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/account/verify-email": {
      "post": {
        "operationId": "app.account.verify_email",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Email the verification link again (x-csrf-token)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/connections": {
      "get": {
        "operationId": "app.connections.list",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "OAuth connections (MCP connectors) of the signed-in account, per client: name, redirect host, connected since, last used, reach, live tokens (browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/connections/{client_id}/disconnect": {
      "post": {
        "operationId": "app.connections.disconnect",
        "parameters": [
          {
            "in": "path",
            "name": "client_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke every access token and refresh token of one OAuth client for this account; idempotent (Origin + x-csrf-token; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/dashboards/{dashboard}/preview": {
      "get": {
        "operationId": "app.dashboards.preview",
        "parameters": [
          {
            "in": "path",
            "name": "dashboard",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "A dashboard's data for its owner, for the hosted page opened without a token (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/hub": {
      "get": {
        "operationId": "app.hub",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "AgentHub: pending approvals, recent activity, schedules and failures, notifications across the account's workspaces",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/hub/channels": {
      "get": {
        "operationId": "app.hub.channels",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Channels you belong to in every workspace",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/hub/inbox": {
      "get": {
        "operationId": "app.hub.inbox",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Your open inbox items in every workspace (mentions, assignments, approvals, reminders, reviews, failures)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/hub/reports": {
      "get": {
        "operationId": "app.hub.reports",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Saved views of type report in every workspace (render with views/:view/render)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/login": {
      "post": {
        "operationId": "app.login",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Sign in with email and password; sets the browser session cookie (one generic error; throttled)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/me": {
      "get": {
        "operationId": "app.me",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Signed-in account, its workspaces and the CSRF token",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/passkey/login": {
      "post": {
        "operationId": "app.passkey.login",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Passwordless sign-in with a passkey (user verification required); sets the session cookie",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/passkey/options": {
      "post": {
        "operationId": "app.passkey.options",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "WebAuthn options for passwordless sign-in with a passkey",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/password/forgot": {
      "post": {
        "operationId": "app.password.forgot",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Email a 30-minute single-use password reset link (same answer for any address)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/password/reset": {
      "post": {
        "operationId": "app.password.reset",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Set a new password with the emailed reset link; ends every session of the account",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/sign-in": {
      "post": {
        "operationId": "app.sign_in",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Email a 15-minute sign-in link for the explorer (same answer for any address)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/sign-in/complete": {
      "post": {
        "operationId": "app.sign_in.complete",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Trade the emailed token for a browser session cookie (ends this browser's previous session)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/sign-in/peek": {
      "get": {
        "operationId": "app.sign_in.peek",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Masked address a sign-in token is for (does not use the token)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/sign-in/second-factor": {
      "post": {
        "operationId": "app.sign_in.second_factor",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Second step of a sign-in: TOTP code, recovery code or passkey; sets the session cookie",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/sign-out": {
      "post": {
        "operationId": "app.sign_out",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "End this browser session (x-csrf-token)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/sign-out-all": {
      "post": {
        "operationId": "app.sign_out_all",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "End every browser session of the account (x-csrf-token)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/sign-up": {
      "post": {
        "operationId": "app.sign_up",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Create an account with email and password (same answer for any address; a verification link is emailed)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/access": {
      "get": {
        "operationId": "app.access",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Your role and per-object / per-field access (as access_inspect)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/approvals": {
      "get": {
        "operationId": "app.approvals.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Proposals (as approvals_list)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/approvals/{approval}": {
      "get": {
        "operationId": "app.approvals.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "approval",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "One proposal with decisions and result",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/approvals/{approval}/decide": {
      "post": {
        "operationId": "app.approvals.decide",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "approval",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Approve, reject or request changes (Origin + x-csrf-token, session younger than 12 h, approver role, action_hash of the reviewed action). The only way to decide a human-only proposal",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/attachments": {
      "post": {
        "operationId": "app.files.attach",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Attach a file to a record (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/attachments/{attachment}": {
      "delete": {
        "operationId": "app.files.detach",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Detach a file from a record (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/channels/{channel}/messages": {
      "get": {
        "operationId": "app.messages.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Messages of a channel or thread (as messages_list)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "app.messages.post",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Post a message or a thread reply as yourself (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites": {
      "get": {
        "operationId": "app.dashboard_sites.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Custom dashboards of the workspace: sharing mode, URL, status (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/delete": {
      "post": {
        "operationId": "app.dashboard_sites.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Delete a custom dashboard and its files (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/invite": {
      "post": {
        "operationId": "app.dashboard_sites.invite",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Invite viewers by email (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/keep": {
      "post": {
        "operationId": "app.dashboard_sites.keep",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Keep a dashboard as it is after its creator lost access (understand: true) (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/pause": {
      "post": {
        "operationId": "app.dashboard_sites.pause",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Pause a custom dashboard (neutral page, no data, sessions end) (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/regenerate-link": {
      "post": {
        "operationId": "app.dashboard_sites.regenerate_link",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Link mode: a new link; the old one stops at once (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/resume": {
      "post": {
        "operationId": "app.dashboard_sites.resume",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Resume a paused custom dashboard (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/revoke": {
      "post": {
        "operationId": "app.dashboard_sites.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke a custom dashboard at once (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/share": {
      "get": {
        "operationId": "app.dashboard_sites.share_get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Sharing of a custom dashboard: mode, URL, password set, viewers (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "app.dashboard_sites.share_set",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Change sharing: mode (link needs confirm_link), password, expiry (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/transfer": {
      "post": {
        "operationId": "app.dashboard_sites.transfer",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "The owner offers the dashboard to another account of the workspace ({email}; null withdraws); audited (D-099) (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/transfer/accept": {
      "post": {
        "operationId": "app.dashboard_sites.transfer_accept",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "The receiving account accepts an offered ownership transfer; audited (D-099) (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/unpublish": {
      "post": {
        "operationId": "app.dashboard_sites.unpublish",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Take a custom dashboard offline (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboard-sites/{site}/viewers/{viewer}/revoke": {
      "post": {
        "operationId": "app.dashboard_sites.revoke_viewer",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "viewer",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Remove one viewer (Origin + x-csrf-token + second factor) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboards": {
      "get": {
        "operationId": "app.dashboards.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Dashboards of the workspace with creator, expiry and access counts (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboards/{dashboard}/revoke": {
      "post": {
        "operationId": "app.dashboards.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dashboard",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke a dashboard link at once (Origin + x-csrf-token) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/dashboards/{dashboard}/rotate": {
      "post": {
        "operationId": "app.dashboards.rotate",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dashboard",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "New link for the same dashboard; the old link stops (Origin + x-csrf-token) (owners and admins; browser session only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/delete": {
      "post": {
        "operationId": "app.workspace.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "confirm_name": {
                    "description": "The workspace name, typed by the person exactly as shown (case-sensitive).",
                    "maxLength": 200,
                    "type": "string"
                  }
                },
                "required": [
                  "confirm_name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Schedule deletion from the explorer (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, owner)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/files": {
      "get": {
        "operationId": "app.files.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Files of the workspace (folder, recursive, tag, kind filters; as files_list)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "app.files.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Start a file upload (pending file) (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/files/search": {
      "get": {
        "operationId": "app.files.search",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Search file names and extracted text (as files_search)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/files/{file}": {
      "get": {
        "operationId": "app.files.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "One file with media metadata and text extraction status",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/files/{file}/content": {
      "get": {
        "operationId": "app.files.content",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "File bytes (attachment; ?inline=1 for png/jpeg/gif/webp images and the audio/video types of signed links; Range supported)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "app.files.content",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Upload one part of a file (Upload-Offset; resumable) (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/files/{file}/thumbnail": {
      "get": {
        "operationId": "app.files.thumbnail",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Thumbnail JPEG made by the media worker (404 until one exists; worker off by default)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/files/{file}/upload": {
      "get": {
        "operationId": "app.files.upload_status",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Bytes received so far for a pending upload",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/files/{file}/versions": {
      "get": {
        "operationId": "app.files.versions",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Version history of a file, newest first",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "app.files.version.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Start a replacement version of a file (editors and up) (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/files/{file}/versions/{version}/content": {
      "patch": {
        "operationId": "app.files.version.content",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Upload one part of a pending version (Upload-Offset; resumable) (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/inbox": {
      "get": {
        "operationId": "app.inbox.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Your inbox (as inbox_list)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/inbox/{item}": {
      "patch": {
        "operationId": "app.inbox.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Mark an inbox item unread, read or done (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/indexes": {
      "get": {
        "operationId": "app.indexes.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Indexes, limits and (?recommendations=1) index recommendations from recent queries (as indexes_list)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "app.indexes.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Create a recommended index (as indexes_create; owners and admins; x-csrf-token)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/links": {
      "post": {
        "operationId": "app.links.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Link two records (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/links/{link}": {
      "delete": {
        "operationId": "app.links.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Unlink two records (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/notification-settings": {
      "get": {
        "operationId": "app.notifications.settings",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Your notification email choice in this workspace",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      },
      "put": {
        "operationId": "app.notifications.settings.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Email: off | immediate | daily (Origin + x-csrf-token, session younger than 12 h)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/objects/{object}/aggregate": {
      "get": {
        "operationId": "app.records.aggregate",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Counts, sums, averages, minimums and maximums, grouped (as records_aggregate; JSON in the query string)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/objects/{object}/records": {
      "get": {
        "operationId": "app.records.query",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Records (as records_query; where/sort as JSON in the query string)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/people": {
      "get": {
        "operationId": "app.people",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Display names of this workspace's members and agents, keyed by actor id (user:…, agent:…)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/published-views": {
      "get": {
        "operationId": "app.views.published.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Your published views",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/published-views/{published}": {
      "delete": {
        "operationId": "app.views.published.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "published",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Revoke a published view (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/query-capabilities": {
      "get": {
        "operationId": "app.query.capabilities",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Filter operators per field type, aggregate metrics and date buckets (read from the query engine)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/records": {
      "post": {
        "operationId": "app.records.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Create a record (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/records/restore": {
      "post": {
        "operationId": "app.records.restore",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Restore records from the recycle bin (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/records/{record}": {
      "delete": {
        "operationId": "app.records.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Move a record to the recycle bin (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "app.records.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "One record",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "app.records.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Update a record with its version; ?view= checks a Kanban view's WIP limits (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/records/{record}/archive": {
      "post": {
        "operationId": "app.records.archive",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Archive a record (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/records/{record}/files": {
      "get": {
        "operationId": "app.records.files",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Files attached to a record",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/records/{record}/history": {
      "get": {
        "operationId": "app.records.history",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Activity of one record, newest first",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/records/{record}/related": {
      "get": {
        "operationId": "app.records.related",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Linked records (as relationships_list)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/records/{record}/unarchive": {
      "post": {
        "operationId": "app.records.unarchive",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Unarchive a record (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/recycle-bin": {
      "get": {
        "operationId": "app.records.recycle_bin",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Recycle bin (as records_recycle_bin)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/restore": {
      "post": {
        "operationId": "app.workspace.restore",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Restore from the explorer (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, owner)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/schema": {
      "get": {
        "operationId": "app.schema",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Schema (as schema_inspect)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/search": {
      "get": {
        "operationId": "app.search",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Full-text search in one object (?object=) or every object with search enabled (?q=)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/usage": {
      "get": {
        "operationId": "app.usage",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Workspace details and quota usage",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/views": {
      "get": {
        "operationId": "app.views.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Saved views (as views_list)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "app.views.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Save a view (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/views/{view}": {
      "patch": {
        "operationId": "app.views.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "view",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Change a view (with its version) (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/views/{view}/publish": {
      "post": {
        "operationId": "app.views.publish",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "view",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Publish a view read-only through an expiring link (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/views/{view}/render": {
      "get": {
        "operationId": "app.views.render",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "view",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "A view rendered by its display config (docs/APP-VIEWS.md)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/app/workspaces/{ws}/workspace-imports": {
      "post": {
        "operationId": "app.workspace.import",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "sessionCookie": []
          }
        ],
        "summary": "Import an uploaded data-export bundle into a NEW workspace of your account (dry_run first; D-090) (Origin + x-csrf-token + Idempotency-Key, session younger than 12 h, member role)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/capabilities": {
      "get": {
        "operationId": "capabilities",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "What this server offers (no auth)",
        "tags": [
          "discovery"
        ],
        "x-agentdb-category": "discovery",
        "x-stability": "stable"
      }
    },
    "/v1/dashboards/{token}": {
      "get": {
        "operationId": "dashboards.view",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Dashboard data (public link; ?since=<marker>&wait=1 long-polls)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/dashboards/{token}/session": {
      "post": {
        "operationId": "dashboards.session",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Trade a dashboard password for a 12 h viewer session",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/delivery-assets/{ws}/{file}": {
      "get": {
        "operationId": "delivery.asset",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "An asset of a published item (re-checked on every download)",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-stability": "stable"
      }
    },
    "/v1/delivery/{ws}/{type}": {
      "get": {
        "operationId": "delivery.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "type",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Published items of a CMS content type (delivery token or public type; ETag, CORS)",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-stability": "stable"
      }
    },
    "/v1/delivery/{ws}/{type}/{slug}": {
      "get": {
        "operationId": "delivery.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "One published item by slug (?locale=)",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-stability": "stable"
      }
    },
    "/v1/file-links/{token}": {
      "get": {
        "operationId": "files.link.view",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Open a signed file link (public; Range supported)",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-stability": "stable"
      }
    },
    "/v1/forms/{ws}/{token}": {
      "get": {
        "operationId": "forms.public.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "A public form's inputs and a single-use ticket",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "forms.public.submit",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Submit a public form (application/json; ticket, honeypot, rate limits)",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-stability": "stable"
      }
    },
    "/v1/inbound/{ws}/{connector}": {
      "post": {
        "operationId": "connectors.inbound",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "connector",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Receive a signed inbound event for a connector (no API key)",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-stability": "experimental"
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "me",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "The calling key: type, workspace, scopes",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-stability": "stable"
      }
    },
    "/v1/me/revoke": {
      "post": {
        "operationId": "me.revoke",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Revoke the calling key",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-stability": "stable"
      }
    },
    "/v1/published-views/{token}": {
      "get": {
        "operationId": "views.published.view",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "A published view's data (public link, read-only)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/published-views/{token}/session": {
      "post": {
        "operationId": "views.published.session",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Trade a published view's password for a 12 h viewer session",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-stability": "stable"
      }
    },
    "/v1/signup": {
      "get": {
        "operationId": "signup.config",
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Signup availability, terms and quotas",
        "tags": [
          "workspaces"
        ],
        "x-agentdb-category": "workspaces",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "signup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "accept_terms": {
                    "const": true,
                    "type": "boolean"
                  },
                  "email": {
                    "maxLength": 254,
                    "type": "string"
                  },
                  "source": {
                    "enum": [
                      "web",
                      "agent"
                    ],
                    "type": "string"
                  },
                  "website": {
                    "maxLength": 200,
                    "type": "string"
                  },
                  "workspace_name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "accept_terms"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Create an account, workspace and account key (shown once)",
        "tags": [
          "workspaces"
        ],
        "x-agentdb-category": "workspaces",
        "x-stability": "stable"
      }
    },
    "/v1/uploads/{token}": {
      "put": {
        "operationId": "uploads.put",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [],
        "summary": "Upload the file for a one-time link (no API key)",
        "tags": [
          "import_export"
        ],
        "x-agentdb-category": "import_export",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}": {
      "get": {
        "operationId": "workspace.info",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Workspace details and quota usage",
        "tags": [
          "workspaces"
        ],
        "x-agentdb-category": "workspaces",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "workspaces.rename",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Rename a workspace or change its slug",
        "tags": [
          "workspaces"
        ],
        "x-agentdb-category": "workspaces",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/access": {
      "get": {
        "operationId": "access.inspect",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "access inspect",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/access-events": {
      "get": {
        "operationId": "access.events",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Audit of member, agent and permission-grant changes (owner/admin)",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/agents": {
      "get": {
        "operationId": "agents.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Named agents of the workspace with role, grantor and status",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "agents.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "description": {
                    "maxLength": 1000,
                    "type": "string"
                  },
                  "expires_in_hours": {
                    "maximum": 8760,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "role": {
                    "enum": [
                      "viewer",
                      "editor",
                      "admin"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "role"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Create a named agent with its own key and a role no higher than yours (key shown once)",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/agents/{agent}": {
      "delete": {
        "operationId": "agents.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "agent",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Revoke an agent, its keys and the agents it delegated to",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/agents/{agent}/keys": {
      "post": {
        "operationId": "agents.keys.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "agent",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Another key for an agent (shown once)",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/aggregate": {
      "post": {
        "operationId": "records.aggregate",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "explain": {
                    "type": "boolean"
                  },
                  "group_by": {
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "bucket": {
                              "enum": [
                                "hour",
                                "day",
                                "week",
                                "month",
                                "year"
                              ],
                              "type": "string"
                            },
                            "field": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "field",
                            "bucket"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 3,
                    "type": "array"
                  },
                  "include_archived": {
                    "default": false,
                    "type": "boolean"
                  },
                  "limit": {
                    "default": 100,
                    "maximum": 1000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "metrics": {
                    "default": [
                      {
                        "op": "count"
                      }
                    ],
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "as": {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        },
                        "field": {
                          "type": "string"
                        },
                        "op": {
                          "enum": [
                            "count",
                            "sum",
                            "avg",
                            "min",
                            "max"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "op"
                      ],
                      "type": "object"
                    },
                    "maxItems": 10,
                    "minItems": 1,
                    "type": "array"
                  },
                  "object": {
                    "type": "string"
                  },
                  "sort": {
                    "additionalProperties": false,
                    "properties": {
                      "by": {
                        "type": "string"
                      },
                      "order": {
                        "default": "desc",
                        "enum": [
                          "asc",
                          "desc"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "by"
                    ],
                    "type": "object"
                  },
                  "where": {
                    "additionalProperties": false,
                    "properties": {
                      "all": {
                        "items": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "in",
                                    "lt",
                                    "lte",
                                    "gt",
                                    "gte",
                                    "is_null",
                                    "is_not_null",
                                    "contains",
                                    "starts_with",
                                    "has_any",
                                    "has_all",
                                    "within_bbox",
                                    "near",
                                    "has"
                                  ],
                                  "type": "string"
                                },
                                "path": {
                                  "maxLength": 400,
                                  "type": "string"
                                },
                                "value": {}
                              },
                              "required": [
                                "field",
                                "op"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "direction": {
                                  "default": "outgoing",
                                  "enum": [
                                    "outgoing",
                                    "incoming"
                                  ],
                                  "type": "string"
                                },
                                "relationship": {
                                  "type": "string"
                                },
                                "where": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "all": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "all"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "relationship",
                                "where"
                              ],
                              "type": "object"
                            }
                          ]
                        },
                        "maxItems": 20,
                        "type": "array"
                      }
                    },
                    "required": [
                      "all"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "object"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records aggregate",
        "tags": [
          "query_search"
        ],
        "x-agentdb-category": "query_search",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/approval-policies": {
      "get": {
        "operationId": "approvals.policy.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "approvals policy list",
        "tags": [
          "approvals_hub"
        ],
        "x-agentdb-category": "approvals_hub",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "approvals.policy.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "applies_to": {
                    "default": [
                      "agent"
                    ],
                    "description": "Callers the policy covers. Default [\"agent\"] (agent keys and OAuth MCP connectors). Add \"key\" to also cover account and workspace API keys used by agents such as Claude Code: [\"agent\", \"key\"]. \"user\" = people, \"form\" = public form submissions.",
                    "items": {
                      "enum": [
                        "agent",
                        "user",
                        "key",
                        "form"
                      ],
                      "type": "string"
                    },
                    "maxItems": 4,
                    "minItems": 1,
                    "type": "array"
                  },
                  "approvers": {
                    "additionalProperties": false,
                    "default": {
                      "kinds": [
                        "user",
                        "key"
                      ],
                      "members": [],
                      "min_role": "admin"
                    },
                    "description": "Who may decide: {min_role, members, kinds}. Default {min_role: \"admin\", members: [], kinds: [\"user\", \"key\"]}.",
                    "properties": {
                      "kinds": {
                        "default": [
                          "user",
                          "key"
                        ],
                        "description": "Kinds of principal that may decide (default [\"user\", \"key\"]). Human-only policies still need a signed-in person.",
                        "items": {
                          "enum": [
                            "user",
                            "key",
                            "agent"
                          ],
                          "type": "string"
                        },
                        "maxItems": 3,
                        "minItems": 1,
                        "type": "array"
                      },
                      "members": {
                        "default": [],
                        "description": "Named deciders whatever their role: \"user:acc_...\" or \"agent:agt_...\".",
                        "items": {
                          "pattern": "^(user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26})$",
                          "type": "string"
                        },
                        "maxItems": 20,
                        "type": "array"
                      },
                      "min_role": {
                        "default": "admin",
                        "description": "Lowest workspace role that may decide (default admin).",
                        "enum": [
                          "editor",
                          "admin",
                          "owner"
                        ],
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "condition": {
                    "additionalProperties": false,
                    "description": "Only when a proposed value meets this condition, e.g. {\"field\": \"amount\", \"op\": \"gt\", \"value\": 1000}. Omit for every matching write.",
                    "properties": {
                      "field": {
                        "description": "A field in the proposed data, e.g. \"amount\".",
                        "maxLength": 64,
                        "minLength": 1,
                        "type": "string"
                      },
                      "op": {
                        "description": "Comparison: gt, gte, lt, lte, eq or neq.",
                        "enum": [
                          "gt",
                          "gte",
                          "lt",
                          "lte",
                          "eq",
                          "neq"
                        ],
                        "type": "string"
                      },
                      "value": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "maxLength": 200,
                            "type": "string"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "amount": {
                                "anyOf": [
                                  {
                                    "maxLength": 40,
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  }
                                ]
                              },
                              "currency": {
                                "maxLength": 3,
                                "type": "string"
                              }
                            },
                            "required": [
                              "amount",
                              "currency"
                            ],
                            "type": "object"
                          }
                        ],
                        "description": "Compared by the field's type: a number, a string (decimal, date), a boolean (eq/neq) or {\"amount\": \"1000.00\", \"currency\": \"EUR\"} for currency fields."
                      }
                    },
                    "required": [
                      "field",
                      "op",
                      "value"
                    ],
                    "type": "object"
                  },
                  "confirm": {
                    "default": false,
                    "description": "High-risk: the approver repeats the approval id as confirm. Default false.",
                    "type": "boolean"
                  },
                  "distinct_approver": {
                    "default": false,
                    "description": "Four-eyes. Default false. true: whoever submitted a proposal can never decide it.",
                    "type": "boolean"
                  },
                  "enabled": {
                    "default": true,
                    "description": "Default true. false keeps the policy but stops it applying.",
                    "type": "boolean"
                  },
                  "expires_in_seconds": {
                    "default": 604800,
                    "description": "Proposals expire after this many seconds (60 to 2592000, default 604800 = 7 days).",
                    "maximum": 2592000,
                    "minimum": 60,
                    "type": "integer"
                  },
                  "fields": {
                    "description": "Field scope: only writes that touch one of these fields, e.g. [\"amount\", \"stage\"]. Deletes touch every field. Omit for any field.",
                    "items": {
                      "maxLength": 64,
                      "minLength": 1,
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  },
                  "human_only": {
                    "default": true,
                    "description": "Default true: only a signed-in person in the AgentHub (/app/hub) can decide; no API key, OAuth token or agent can. false: any principal the approvers rule allows.",
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Policy name shown to approvers, e.g. \"Large deals need an admin\".",
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "objects": {
                    "description": "Object scope: only writes to these object types, e.g. [\"deal\"]. Omit for every object.",
                    "items": {
                      "maxLength": 64,
                      "minLength": 1,
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  },
                  "operations": {
                    "description": "Domain operation names that need approval: \"records.update\", a prefix \"records.*\" or \"*\". Use domain names (records.update), not tool names (records_update).",
                    "items": {
                      "maxLength": 64,
                      "pattern": "^(\\*|[a-z_]+(\\.[a-z_]+)*(\\.\\*)?)$",
                      "type": "string"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  },
                  "quorum": {
                    "default": 1,
                    "description": "Distinct approvals needed (1-5, default 1).",
                    "maximum": 5,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "name",
                  "operations"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "approvals policy create",
        "tags": [
          "approvals_hub"
        ],
        "x-agentdb-category": "approvals_hub",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/approval-policies/{policy}": {
      "delete": {
        "operationId": "approvals.policy.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "policy",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "approvals policy delete",
        "tags": [
          "approvals_hub"
        ],
        "x-agentdb-category": "approvals_hub",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "approvals.policy.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "policy",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "applies_to": {
                    "description": "Callers the policy covers. Default [\"agent\"] (agent keys and OAuth MCP connectors). Add \"key\" to also cover account and workspace API keys used by agents such as Claude Code: [\"agent\", \"key\"]. \"user\" = people, \"form\" = public form submissions.",
                    "items": {
                      "enum": [
                        "agent",
                        "user",
                        "key",
                        "form"
                      ],
                      "type": "string"
                    },
                    "maxItems": 4,
                    "minItems": 1,
                    "type": "array"
                  },
                  "approvers": {
                    "additionalProperties": false,
                    "description": "Who may decide: {min_role, members, kinds}. Default {min_role: \"admin\", members: [], kinds: [\"user\", \"key\"]}.",
                    "properties": {
                      "kinds": {
                        "default": [
                          "user",
                          "key"
                        ],
                        "description": "Kinds of principal that may decide (default [\"user\", \"key\"]). Human-only policies still need a signed-in person.",
                        "items": {
                          "enum": [
                            "user",
                            "key",
                            "agent"
                          ],
                          "type": "string"
                        },
                        "maxItems": 3,
                        "minItems": 1,
                        "type": "array"
                      },
                      "members": {
                        "default": [],
                        "description": "Named deciders whatever their role: \"user:acc_...\" or \"agent:agt_...\".",
                        "items": {
                          "pattern": "^(user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26})$",
                          "type": "string"
                        },
                        "maxItems": 20,
                        "type": "array"
                      },
                      "min_role": {
                        "default": "admin",
                        "description": "Lowest workspace role that may decide (default admin).",
                        "enum": [
                          "editor",
                          "admin",
                          "owner"
                        ],
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "condition": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "description": "Only when a proposed value meets this condition, e.g. {\"field\": \"amount\", \"op\": \"gt\", \"value\": 1000}. Omit for every matching write.",
                        "properties": {
                          "field": {
                            "description": "A field in the proposed data, e.g. \"amount\".",
                            "maxLength": 64,
                            "minLength": 1,
                            "type": "string"
                          },
                          "op": {
                            "description": "Comparison: gt, gte, lt, lte, eq or neq.",
                            "enum": [
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "eq",
                              "neq"
                            ],
                            "type": "string"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "maxLength": 200,
                                "type": "string"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "amount": {
                                    "anyOf": [
                                      {
                                        "maxLength": 40,
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      }
                                    ]
                                  },
                                  "currency": {
                                    "maxLength": 3,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency"
                                ],
                                "type": "object"
                              }
                            ],
                            "description": "Compared by the field's type: a number, a string (decimal, date), a boolean (eq/neq) or {\"amount\": \"1000.00\", \"currency\": \"EUR\"} for currency fields."
                          }
                        },
                        "required": [
                          "field",
                          "op",
                          "value"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "confirm": {
                    "description": "High-risk: the approver repeats the approval id as confirm. Default false.",
                    "type": "boolean"
                  },
                  "distinct_approver": {
                    "description": "Four-eyes. Default false. true: whoever submitted a proposal can never decide it.",
                    "type": "boolean"
                  },
                  "enabled": {
                    "description": "Default true. false keeps the policy but stops it applying.",
                    "type": "boolean"
                  },
                  "expires_in_seconds": {
                    "description": "Proposals expire after this many seconds (60 to 2592000, default 604800 = 7 days).",
                    "maximum": 2592000,
                    "minimum": 60,
                    "type": "integer"
                  },
                  "fields": {
                    "anyOf": [
                      {
                        "description": "Field scope: only writes that touch one of these fields, e.g. [\"amount\", \"stage\"]. Deletes touch every field. Omit for any field.",
                        "items": {
                          "maxLength": 64,
                          "minLength": 1,
                          "type": "string"
                        },
                        "maxItems": 50,
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "human_only": {
                    "description": "Default true: only a signed-in person in the AgentHub (/app/hub) can decide; no API key, OAuth token or agent can. false: any principal the approvers rule allows.",
                    "type": "boolean"
                  },
                  "name": {
                    "description": "Policy name shown to approvers, e.g. \"Large deals need an admin\".",
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "objects": {
                    "anyOf": [
                      {
                        "description": "Object scope: only writes to these object types, e.g. [\"deal\"]. Omit for every object.",
                        "items": {
                          "maxLength": 64,
                          "minLength": 1,
                          "type": "string"
                        },
                        "maxItems": 50,
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "operations": {
                    "description": "Domain operation names that need approval: \"records.update\", a prefix \"records.*\" or \"*\". Use domain names (records.update), not tool names (records_update).",
                    "items": {
                      "maxLength": 64,
                      "pattern": "^(\\*|[a-z_]+(\\.[a-z_]+)*(\\.\\*)?)$",
                      "type": "string"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  },
                  "quorum": {
                    "description": "Distinct approvals needed (1-5, default 1).",
                    "maximum": 5,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "version"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "approvals policy update",
        "tags": [
          "approvals_hub"
        ],
        "x-agentdb-category": "approvals_hub",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/approvals": {
      "get": {
        "operationId": "approvals.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "pending",
                "executed",
                "failed",
                "rejected",
                "changes_requested",
                "expired",
                "cancelled"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mine",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "enum": [
                    "0",
                    "1",
                    "true",
                    "false"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "decidable",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "enum": [
                    "0",
                    "1",
                    "true",
                    "false"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "approvals list",
        "tags": [
          "approvals_hub"
        ],
        "x-agentdb-category": "approvals_hub",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "approvals.submit",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "evidence": {},
                  "expires_in_seconds": {
                    "maximum": 2592000,
                    "minimum": 60,
                    "type": "integer"
                  },
                  "input": {},
                  "justification": {
                    "maxLength": 4000,
                    "type": "string"
                  },
                  "operation": {
                    "maxLength": 64,
                    "minLength": 1,
                    "type": "string"
                  },
                  "params": {
                    "additionalProperties": {
                      "maxLength": 255,
                      "type": "string"
                    },
                    "default": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "supersedes": {
                    "maxLength": 64,
                    "type": "string"
                  }
                },
                "required": [
                  "operation"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "approvals submit",
        "tags": [
          "approvals_hub"
        ],
        "x-agentdb-category": "approvals_hub",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/approvals/{approval}": {
      "get": {
        "operationId": "approvals.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "approval",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "approvals get",
        "tags": [
          "approvals_hub"
        ],
        "x-agentdb-category": "approvals_hub",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/approvals/{approval}/cancel": {
      "post": {
        "operationId": "approvals.cancel",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "approval",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "comment": {
                    "maxLength": 2000,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "approvals cancel",
        "tags": [
          "approvals_hub"
        ],
        "x-agentdb-category": "approvals_hub",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/approvals/{approval}/decide": {
      "post": {
        "operationId": "approvals.decide",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "approval",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "action_hash": {
                    "pattern": "^[0-9a-f]{64}$",
                    "type": "string"
                  },
                  "comment": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "confirm": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "decision": {
                    "enum": [
                      "approve",
                      "reject",
                      "request_changes"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "decision"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "approvals decide",
        "tags": [
          "approvals_hub"
        ],
        "x-agentdb-category": "approvals_hub",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/attachments": {
      "post": {
        "operationId": "files.attach",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "file_id": {
                    "type": "string"
                  },
                  "record_id": {
                    "type": "string"
                  },
                  "role": {
                    "default": "attachment",
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  }
                },
                "required": [
                  "file_id",
                  "record_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files attach",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/attachments/{attachment}": {
      "delete": {
        "operationId": "files.detach",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files detach",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/calendar-events": {
      "get": {
        "operationId": "calendar.events.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "calendar_ids",
            "required": false,
            "schema": {
              "items": {
                "maxLength": 64,
                "type": "string"
              },
              "maxItems": 50,
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "participant",
            "required": false,
            "schema": {
              "maxLength": 330,
              "pattern": "^(user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26}|resource:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}|email:[^\\s@<>\"]{1,64}@[^\\s@<>\"]{1,255})$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expand",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "include_cancelled",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 500,
              "maximum": 2000,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar events list",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "calendar.event.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "all_day": {
                    "type": "boolean"
                  },
                  "calendar_id": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "description": {
                    "maxLength": 20000,
                    "type": "string"
                  },
                  "duration_minutes": {
                    "maximum": 527040,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "end": {
                    "maxLength": 40,
                    "minLength": 10,
                    "type": "string"
                  },
                  "exdates": {
                    "items": {
                      "maxLength": 40,
                      "type": "string"
                    },
                    "maxItems": 500,
                    "type": "array"
                  },
                  "location": {
                    "maxLength": 500,
                    "type": "string"
                  },
                  "meeting_url": {
                    "maxLength": 2048,
                    "type": "string"
                  },
                  "on_conflict": {
                    "default": "allow",
                    "enum": [
                      "allow",
                      "reject"
                    ],
                    "type": "string"
                  },
                  "participants": {
                    "items": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "id": {
                              "pattern": "^acc_[a-z2-7]{26}$",
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "response": {
                              "enum": [
                                "needs_action",
                                "accepted",
                                "declined",
                                "tentative"
                              ],
                              "type": "string"
                            },
                            "type": {
                              "const": "user",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "id": {
                              "pattern": "^agt_[a-z2-7]{26}$",
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "response": {
                              "enum": [
                                "needs_action",
                                "accepted",
                                "declined",
                                "tentative"
                              ],
                              "type": "string"
                            },
                            "type": {
                              "const": "agent",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "id": {
                              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$",
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "response": {
                              "enum": [
                                "needs_action",
                                "accepted",
                                "declined",
                                "tentative"
                              ],
                              "type": "string"
                            },
                            "type": {
                              "const": "resource",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "email": {
                              "maxLength": 320,
                              "pattern": "^[^\\s@<>\"]{1,64}@[^\\s@<>\"]{1,255}$",
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "response": {
                              "enum": [
                                "needs_action",
                                "accepted",
                                "declined",
                                "tentative"
                              ],
                              "type": "string"
                            },
                            "type": {
                              "const": "email",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "email"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 100,
                    "type": "array"
                  },
                  "recurrence": {
                    "maxLength": 1000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "reminders": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "minutes_before": {
                          "maximum": 40320,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "minutes_before"
                      ],
                      "type": "object"
                    },
                    "maxItems": 5,
                    "type": "array"
                  },
                  "start": {
                    "maxLength": 40,
                    "minLength": 10,
                    "type": "string"
                  },
                  "status": {
                    "enum": [
                      "confirmed",
                      "tentative",
                      "cancelled"
                    ],
                    "type": "string"
                  },
                  "timezone": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 500,
                    "minLength": 1,
                    "type": "string"
                  },
                  "transparency": {
                    "enum": [
                      "busy",
                      "free"
                    ],
                    "type": "string"
                  },
                  "uid": {
                    "maxLength": 255,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "calendar_id",
                  "title",
                  "start"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar event create",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/calendar-events/{event}": {
      "delete": {
        "operationId": "calendar.event.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "event",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "occurrence": {
                    "maxLength": 40,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar event delete",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "calendar.event.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "event",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar event get",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "calendar.event.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "event",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "all_day": {
                    "type": "boolean"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "maxLength": 20000,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "duration_minutes": {
                    "maximum": 527040,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "end": {
                    "maxLength": 40,
                    "minLength": 10,
                    "type": "string"
                  },
                  "exdates": {
                    "items": {
                      "maxLength": 40,
                      "type": "string"
                    },
                    "maxItems": 500,
                    "type": "array"
                  },
                  "location": {
                    "anyOf": [
                      {
                        "maxLength": 500,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "meeting_url": {
                    "anyOf": [
                      {
                        "maxLength": 2048,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "occurrence": {
                    "maxLength": 40,
                    "type": "string"
                  },
                  "on_conflict": {
                    "default": "allow",
                    "enum": [
                      "allow",
                      "reject"
                    ],
                    "type": "string"
                  },
                  "participants": {
                    "items": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "id": {
                              "pattern": "^acc_[a-z2-7]{26}$",
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "response": {
                              "enum": [
                                "needs_action",
                                "accepted",
                                "declined",
                                "tentative"
                              ],
                              "type": "string"
                            },
                            "type": {
                              "const": "user",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "id": {
                              "pattern": "^agt_[a-z2-7]{26}$",
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "response": {
                              "enum": [
                                "needs_action",
                                "accepted",
                                "declined",
                                "tentative"
                              ],
                              "type": "string"
                            },
                            "type": {
                              "const": "agent",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "id": {
                              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$",
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "response": {
                              "enum": [
                                "needs_action",
                                "accepted",
                                "declined",
                                "tentative"
                              ],
                              "type": "string"
                            },
                            "type": {
                              "const": "resource",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "email": {
                              "maxLength": 320,
                              "pattern": "^[^\\s@<>\"]{1,64}@[^\\s@<>\"]{1,255}$",
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "response": {
                              "enum": [
                                "needs_action",
                                "accepted",
                                "declined",
                                "tentative"
                              ],
                              "type": "string"
                            },
                            "type": {
                              "const": "email",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "email"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 100,
                    "type": "array"
                  },
                  "recurrence": {
                    "anyOf": [
                      {
                        "maxLength": 1000,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reminders": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "minutes_before": {
                          "maximum": 40320,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "minutes_before"
                      ],
                      "type": "object"
                    },
                    "maxItems": 5,
                    "type": "array"
                  },
                  "start": {
                    "maxLength": 40,
                    "minLength": 10,
                    "type": "string"
                  },
                  "status": {
                    "enum": [
                      "confirmed",
                      "tentative",
                      "cancelled"
                    ],
                    "type": "string"
                  },
                  "timezone": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 500,
                    "minLength": 1,
                    "type": "string"
                  },
                  "transparency": {
                    "enum": [
                      "busy",
                      "free"
                    ],
                    "type": "string"
                  },
                  "version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar event update",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/calendar-events/{event}/respond": {
      "post": {
        "operationId": "calendar.event.respond",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "event",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "participant": {
                    "maxLength": 330,
                    "pattern": "^(user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26}|resource:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}|email:[^\\s@<>\"]{1,64}@[^\\s@<>\"]{1,255})$",
                    "type": "string"
                  },
                  "response": {
                    "enum": [
                      "needs_action",
                      "accepted",
                      "declined",
                      "tentative"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "response"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar event respond",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/calendar/availability": {
      "post": {
        "operationId": "calendar.availability",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "calendar_ids": {
                    "items": {
                      "maxLength": 64,
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  },
                  "from": {
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                    "type": "string"
                  },
                  "participants": {
                    "items": {
                      "maxLength": 330,
                      "pattern": "^(user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26}|resource:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}|email:[^\\s@<>\"]{1,64}@[^\\s@<>\"]{1,255})$",
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  },
                  "to": {
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                    "type": "string"
                  },
                  "working_hours": {
                    "additionalProperties": false,
                    "properties": {
                      "days": {
                        "default": [
                          "MO",
                          "TU",
                          "WE",
                          "TH",
                          "FR"
                        ],
                        "items": {
                          "enum": [
                            "MO",
                            "TU",
                            "WE",
                            "TH",
                            "FR",
                            "SA",
                            "SU"
                          ],
                          "type": "string"
                        },
                        "maxItems": 7,
                        "minItems": 1,
                        "type": "array"
                      },
                      "end": {
                        "default": "17:00",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                        "type": "string"
                      },
                      "start": {
                        "default": "09:00",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                        "type": "string"
                      },
                      "timezone": {
                        "maxLength": 64,
                        "type": "string"
                      }
                    },
                    "required": [
                      "timezone"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar availability",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/calendar/expand": {
      "post": {
        "operationId": "calendar.expand",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "duration_minutes": {
                    "default": 0,
                    "maximum": 527040,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "exdates": {
                    "items": {
                      "maxLength": 40,
                      "type": "string"
                    },
                    "maxItems": 500,
                    "type": "array"
                  },
                  "from": {
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                    "type": "string"
                  },
                  "limit": {
                    "default": 100,
                    "maximum": 2000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "rule": {
                    "maxLength": 1000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "start": {
                    "maxLength": 40,
                    "minLength": 10,
                    "type": "string"
                  },
                  "timezone": {
                    "default": "UTC",
                    "maxLength": 64,
                    "type": "string"
                  },
                  "to": {
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                    "type": "string"
                  }
                },
                "required": [
                  "rule",
                  "start",
                  "from",
                  "to"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar expand",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/calendar/slots": {
      "post": {
        "operationId": "calendar.slots",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "buffer_minutes": {
                    "default": 0,
                    "maximum": 240,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "calendar_ids": {
                    "items": {
                      "maxLength": 64,
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  },
                  "duration_minutes": {
                    "maximum": 1440,
                    "minimum": 5,
                    "type": "integer"
                  },
                  "from": {
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                    "type": "string"
                  },
                  "limit": {
                    "default": 10,
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "participants": {
                    "items": {
                      "maxLength": 330,
                      "pattern": "^(user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26}|resource:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}|email:[^\\s@<>\"]{1,64}@[^\\s@<>\"]{1,255})$",
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  },
                  "step_minutes": {
                    "default": 15,
                    "maximum": 1440,
                    "minimum": 5,
                    "type": "integer"
                  },
                  "to": {
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                    "type": "string"
                  },
                  "working_hours": {
                    "additionalProperties": false,
                    "properties": {
                      "days": {
                        "default": [
                          "MO",
                          "TU",
                          "WE",
                          "TH",
                          "FR"
                        ],
                        "items": {
                          "enum": [
                            "MO",
                            "TU",
                            "WE",
                            "TH",
                            "FR",
                            "SA",
                            "SU"
                          ],
                          "type": "string"
                        },
                        "maxItems": 7,
                        "minItems": 1,
                        "type": "array"
                      },
                      "end": {
                        "default": "17:00",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                        "type": "string"
                      },
                      "start": {
                        "default": "09:00",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                        "type": "string"
                      },
                      "timezone": {
                        "maxLength": 64,
                        "type": "string"
                      }
                    },
                    "required": [
                      "timezone"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "from",
                  "to",
                  "duration_minutes"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar slots",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/calendars": {
      "get": {
        "operationId": "calendar.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar list",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "calendar.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "description": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "owner": {
                    "maxLength": 330,
                    "pattern": "^(user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26}|resource:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}|email:[^\\s@<>\"]{1,64}@[^\\s@<>\"]{1,255})$",
                    "type": "string"
                  },
                  "timezone": {
                    "default": "UTC",
                    "maxLength": 64,
                    "type": "string"
                  },
                  "writers": {
                    "items": {
                      "pattern": "^(user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26})$",
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar create",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/calendars/import": {
      "post": {
        "operationId": "calendar.import",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "calendar_id": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "ics": {
                    "maxLength": 1048576,
                    "minLength": 1,
                    "type": "string"
                  },
                  "on_existing": {
                    "default": "update",
                    "enum": [
                      "update",
                      "skip"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "calendar_id",
                  "ics"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar import",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/calendars/{calendar}": {
      "delete": {
        "operationId": "calendar.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "calendar",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar delete",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "calendar.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "calendar",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar get",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "calendar.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "calendar",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "description": {
                    "anyOf": [
                      {
                        "maxLength": 2000,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "owner": {
                    "anyOf": [
                      {
                        "maxLength": 330,
                        "pattern": "^(user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26}|resource:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}|email:[^\\s@<>\"]{1,64}@[^\\s@<>\"]{1,255})$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "timezone": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "writers": {
                    "anyOf": [
                      {
                        "items": {
                          "pattern": "^(user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26})$",
                          "type": "string"
                        },
                        "maxItems": 50,
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar update",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/calendars/{calendar}/ics": {
      "get": {
        "operationId": "calendar.export",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "calendar",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "calendar export",
        "tags": [
          "calendar"
        ],
        "x-agentdb-category": "calendar",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/changes": {
      "get": {
        "operationId": "records.changes",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Change feed (?after=&limit=&wait=1)",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/channels": {
      "get": {
        "operationId": "channels.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "joined",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels list",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "channels.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "members": {
                    "default": [],
                    "items": {
                      "pattern": "^(agent:agt_[a-z2-7]{26}|user:acc_[a-z2-7]{26}|key:key_[a-z2-7]{26})$",
                      "type": "string"
                    },
                    "maxItems": 100,
                    "type": "array"
                  },
                  "name": {
                    "pattern": "^[a-z0-9][a-z0-9_-]{0,79}$",
                    "type": "string"
                  },
                  "retention_days": {
                    "maximum": 3650,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "topic": {
                    "maxLength": 500,
                    "type": "string"
                  },
                  "visibility": {
                    "default": "public",
                    "enum": [
                      "public",
                      "private"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels create",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/channels/{channel}": {
      "get": {
        "operationId": "channels.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels get",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "channels.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "archived": {
                    "type": "boolean"
                  },
                  "name": {
                    "pattern": "^[a-z0-9][a-z0-9_-]{0,79}$",
                    "type": "string"
                  },
                  "retention_days": {
                    "anyOf": [
                      {
                        "maximum": 3650,
                        "minimum": 1,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "topic": {
                    "anyOf": [
                      {
                        "maxLength": 500,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels update",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/channels/{channel}/ack": {
      "post": {
        "operationId": "channels.ack",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "ack_seq": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "read_seq": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels ack",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/channels/{channel}/members": {
      "get": {
        "operationId": "channels.members.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels members list",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "channels.members.add",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "members": {
                    "items": {
                      "pattern": "^(agent:agt_[a-z2-7]{26}|user:acc_[a-z2-7]{26}|key:key_[a-z2-7]{26})$",
                      "type": "string"
                    },
                    "maxItems": 100,
                    "minItems": 1,
                    "type": "array"
                  },
                  "role": {
                    "default": "member",
                    "enum": [
                      "member",
                      "moderator"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "members"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels members add",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/channels/{channel}/members/{member}": {
      "delete": {
        "operationId": "channels.members.remove",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "member",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels members remove",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/channels/{channel}/messages": {
      "get": {
        "operationId": "messages.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "thread_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "messages list (?wait=1 long-polls up to 25 s)",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "messages.post",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "attachments": {
                    "default": [],
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  },
                  "body": {
                    "maxLength": 20000,
                    "type": "string"
                  },
                  "dedupe_key": {
                    "pattern": "^[A-Za-z0-9._:-]{1,200}$",
                    "type": "string"
                  },
                  "links": {
                    "default": [],
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "mentions": {
                    "default": [],
                    "items": {
                      "pattern": "^(agent:agt_[a-z2-7]{26}|user:acc_[a-z2-7]{26}|key:key_[a-z2-7]{26})$",
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  },
                  "payload": {
                    "additionalProperties": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "priority": {
                    "default": "normal",
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "urgent"
                    ],
                    "type": "string"
                  },
                  "thread_id": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "messages post",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/channels/{channel}/pending": {
      "get": {
        "operationId": "channels.pending",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels pending (?wait=1 long-polls up to 25 s)",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/channels/{channel}/purge": {
      "post": {
        "operationId": "channels.purge",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels purge",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/channels/{channel}/subscribe": {
      "post": {
        "operationId": "channels.subscribe",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "notify": {
                    "default": "mentions",
                    "enum": [
                      "all",
                      "mentions",
                      "none"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels subscribe",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/cms/delivery-tokens": {
      "get": {
        "operationId": "cms.tokens.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms tokens list",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "cms.tokens.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "allowed_origins": {
                    "items": {
                      "pattern": "^(https:\\/\\/[a-z0-9.-]+(:\\d+)?|http:\\/\\/(localhost|127\\.0\\.0\\.1)(:\\d+)?)$",
                      "type": "string"
                    },
                    "maxItems": 20,
                    "minItems": 1,
                    "type": "array"
                  },
                  "expires_in_days": {
                    "maximum": 3650,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "label": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "types": {
                    "items": {
                      "pattern": "^[a-z][a-z0-9_]{0,62}$",
                      "type": "string"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "label"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms tokens create",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/cms/delivery-tokens/{token}": {
      "delete": {
        "operationId": "cms.tokens.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms tokens revoke",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/cms/preview": {
      "post": {
        "operationId": "cms.preview",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "limit": {
                    "default": 20,
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "locale": {
                    "maxLength": 35,
                    "minLength": 1,
                    "type": "string"
                  },
                  "object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "slug": {
                    "maxLength": 500,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "object"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms preview",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/cms/types": {
      "get": {
        "operationId": "cms.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms list",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "cms.configure",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "allowed_origins": {
                    "anyOf": [
                      {
                        "items": {
                          "pattern": "^(https:\\/\\/[a-z0-9.-]+(:\\d+)?|http:\\/\\/(localhost|127\\.0\\.0\\.1)(:\\d+)?)$",
                          "type": "string"
                        },
                        "maxItems": 20,
                        "minItems": 1,
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "cache_seconds": {
                    "default": 60,
                    "maximum": 86400,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "delivery": {
                    "default": "token",
                    "enum": [
                      "off",
                      "token",
                      "public"
                    ],
                    "type": "string"
                  },
                  "locale_field": {
                    "anyOf": [
                      {
                        "pattern": "^[a-z][a-z0-9_]{0,62}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "public_fields": {
                    "items": {
                      "pattern": "^[a-z][a-z0-9_]{0,62}$",
                      "type": "string"
                    },
                    "maxItems": 100,
                    "minItems": 1,
                    "type": "array"
                  },
                  "published_status": {
                    "default": "published",
                    "maxLength": 64,
                    "minLength": 1,
                    "type": "string"
                  },
                  "slug_field": {
                    "default": "slug",
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "status_field": {
                    "default": "status",
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "translation_relationship": {
                    "anyOf": [
                      {
                        "pattern": "^[a-z][a-z0-9_]{0,62}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "object",
                  "public_fields"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms configure",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/cms/types/{object}": {
      "delete": {
        "operationId": "cms.unconfigure",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms unconfigure",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "cms.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms get",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/connector-inbound-events": {
      "get": {
        "operationId": "connectors.inbound_events",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "connector_id",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors inbound events",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/connector-runs": {
      "get": {
        "operationId": "connectors.runs",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "connector_id",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "succeeded",
                "failed"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors runs",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/connector-types": {
      "get": {
        "operationId": "connectors.types",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors types",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/connectors": {
      "get": {
        "operationId": "connectors.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors list",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      },
      "post": {
        "operationId": "connectors.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "allowed_actions": {
                    "default": [],
                    "items": {
                      "pattern": "^[a-z][a-z0-9_]{0,63}$",
                      "type": "string"
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "config": {
                    "additionalProperties": {},
                    "default": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "credentials": {
                    "additionalProperties": {
                      "maxLength": 4096,
                      "minLength": 1,
                      "type": "string"
                    },
                    "propertyNames": {
                      "pattern": "^[a-z][a-z0-9_]{0,63}$",
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "inbound": {
                    "default": false,
                    "type": "boolean"
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "outbound_webhook_id": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "type": {
                    "maxLength": 64,
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors create",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/connectors/{connector}": {
      "delete": {
        "operationId": "connectors.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "connector",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors delete",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      },
      "get": {
        "operationId": "connectors.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "connector",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors get",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      },
      "patch": {
        "operationId": "connectors.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "connector",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "allowed_actions": {
                    "items": {
                      "pattern": "^[a-z][a-z0-9_]{0,63}$",
                      "type": "string"
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "config": {
                    "additionalProperties": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "credentials": {
                    "additionalProperties": {
                      "maxLength": 4096,
                      "minLength": 1,
                      "type": "string"
                    },
                    "propertyNames": {
                      "pattern": "^[a-z][a-z0-9_]{0,63}$",
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "outbound_webhook_id": {
                    "anyOf": [
                      {
                        "maxLength": 64,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "active",
                      "paused"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors update",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/connectors/{connector}/actions": {
      "post": {
        "operationId": "connectors.send",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "connector",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "pattern": "^[a-z][a-z0-9_]{0,63}$",
                    "type": "string"
                  },
                  "payload": {
                    "additionalProperties": {},
                    "default": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "action"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors send",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/connectors/{connector}/rotate-inbound-secret": {
      "post": {
        "operationId": "connectors.rotate_inbound_secret",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "connector",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors rotate inbound secret",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/connectors/{connector}/sync": {
      "post": {
        "operationId": "connectors.sync",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "connector",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "connectors sync",
        "tags": [
          "integrations"
        ],
        "x-agentdb-category": "integrations",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/conversations": {
      "get": {
        "operationId": "conversations.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "default": "unresolved",
              "enum": [
                "open",
                "pending",
                "resolved",
                "unresolved",
                "all"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "assignee",
            "required": false,
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "conversations list",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      },
      "post": {
        "operationId": "conversations.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "assignee": {
                    "pattern": "^(agent:agt_[a-z2-7]{26}|user:acc_[a-z2-7]{26}|key:key_[a-z2-7]{26})$",
                    "type": "string"
                  },
                  "contact": {
                    "maxLength": 320,
                    "type": "string"
                  },
                  "external_ref": {
                    "pattern": "^[A-Za-z0-9._:@<>+=/-]{1,300}$",
                    "type": "string"
                  },
                  "note": {
                    "maxLength": 20000,
                    "type": "string"
                  },
                  "provider": {
                    "default": "internal",
                    "enum": [
                      "internal",
                      "email",
                      "api"
                    ],
                    "type": "string"
                  },
                  "subject": {
                    "maxLength": 300,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "subject"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "conversations create",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/conversations/inbound": {
      "post": {
        "operationId": "conversations.receive",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "maxLength": 50000,
                    "type": "string"
                  },
                  "external_id": {
                    "pattern": "^[A-Za-z0-9._:@<>+=/-]{1,300}$",
                    "type": "string"
                  },
                  "external_ref": {
                    "pattern": "^[A-Za-z0-9._:@<>+=/-]{1,300}$",
                    "type": "string"
                  },
                  "from": {
                    "maxLength": 320,
                    "minLength": 1,
                    "type": "string"
                  },
                  "provider": {
                    "default": "api",
                    "maxLength": 40,
                    "type": "string"
                  },
                  "subject": {
                    "maxLength": 300,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "external_ref",
                  "external_id",
                  "from",
                  "body"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "conversations receive",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/conversations/{conversation}": {
      "get": {
        "operationId": "conversations.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": 0,
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "conversations get",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/conversations/{conversation}/assign": {
      "post": {
        "operationId": "conversations.assign",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "assignee": {
                    "anyOf": [
                      {
                        "pattern": "^(agent:agt_[a-z2-7]{26}|user:acc_[a-z2-7]{26}|key:key_[a-z2-7]{26})$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "maxLength": 2000,
                    "type": "string"
                  }
                },
                "required": [
                  "assignee"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "conversations assign",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/conversations/{conversation}/claim": {
      "post": {
        "operationId": "conversations.claim",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "note": {
                    "maxLength": 2000,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "conversations claim",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/conversations/{conversation}/replies": {
      "post": {
        "operationId": "conversations.reply",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "maxLength": 20000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "kind": {
                    "enum": [
                      "outbound",
                      "note"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "body"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "conversations reply",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/conversations/{conversation}/resolve": {
      "post": {
        "operationId": "conversations.resolve",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "note": {
                    "maxLength": 2000,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "conversations resolve",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites": {
      "get": {
        "operationId": "dashboard_sites.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "List custom dashboards with URL, sharing mode and status",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      },
      "post": {
        "operationId": "dashboard_sites.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "expires_at": {
                    "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                    "type": "string"
                  },
                  "expires_in_days": {
                    "anyOf": [
                      {
                        "maximum": 365,
                        "minimum": 1,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mode": {
                    "enum": [
                      "only_me",
                      "link",
                      "link_password",
                      "people"
                    ],
                    "type": "string"
                  },
                  "password": {
                    "maxLength": 200,
                    "minLength": 10,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Create a custom dashboard (title, mode only_me|link|link_password|people, expiry); nothing is live until you publish",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}": {
      "delete": {
        "operationId": "dashboard_sites.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Delete a custom dashboard and its stored files",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      },
      "get": {
        "operationId": "dashboard_sites.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "One custom dashboard: sharing, versions with status, files and validation problems, recent audit events",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      },
      "patch": {
        "operationId": "dashboard_sites.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Rename a custom dashboard",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/pause": {
      "post": {
        "operationId": "dashboard_sites.pause",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Pause: a neutral paused page, no data, every session ends (owners, admins, the creator)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/publish": {
      "post": {
        "operationId": "dashboard_sites.publish",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "version"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Make a ready version live (atomic switch; publish an older version to roll back)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/regenerate-link": {
      "post": {
        "operationId": "dashboard_sites.regenerate_link",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Link mode: a new link key (?k=); the old link and every link session stop at once (owners, admins, the creator)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/resume": {
      "post": {
        "operationId": "dashboard_sites.resume",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Resume a paused dashboard (owners, admins, the creator)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/revoke": {
      "post": {
        "operationId": "dashboard_sites.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Revoke the dashboard for good; every open session stops at once",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/share": {
      "get": {
        "operationId": "dashboard_sites.share_get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Sharing of a custom dashboard: mode, URL, password set or not, expiry, invited viewers",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      },
      "put": {
        "operationId": "dashboard_sites.share_set",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "clear_expiry": {
                    "type": "boolean"
                  },
                  "expires_at": {
                    "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                    "type": "string"
                  },
                  "expires_in_days": {
                    "anyOf": [
                      {
                        "maximum": 365,
                        "minimum": 1,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mode": {
                    "enum": [
                      "only_me",
                      "link",
                      "link_password",
                      "people"
                    ],
                    "type": "string"
                  },
                  "password": {
                    "maxLength": 200,
                    "minLength": 10,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Change sharing: mode, password, expiry (an agent's switch to link on a dashboard with data needs approval)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/unpublish": {
      "post": {
        "operationId": "dashboard_sites.unpublish",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Take the dashboard offline; versions are kept, viewer sessions end",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/versions": {
      "post": {
        "operationId": "dashboard_sites.upload",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "complete": {
                    "type": "boolean"
                  },
                  "files": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "content_base64": {
                          "maxLength": 955742,
                          "type": "string"
                        },
                        "path": {
                          "maxLength": 400,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "path",
                        "content_base64"
                      ],
                      "type": "object"
                    },
                    "maxItems": 200,
                    "type": "array"
                  },
                  "version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "zip_base64": {
                    "maxLength": 955742,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Start a new version; optionally with base64 files or zip (JSON), complete defaults to true when files are sent",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/versions/{version}/complete": {
      "post": {
        "operationId": "dashboard_sites.complete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Finish a version: index.html required, manifest.json data sources checked; ready or failed with every problem",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/versions/{version}/files/*": {
      "put": {
        "operationId": "dashboard_sites.put_file",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Upload one file's raw bytes (application/octet-stream) into an uploading version",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/versions/{version}/preview": {
      "post": {
        "operationId": "dashboard_sites.preview",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Owner-only single-use preview link of a ready version (10 minutes)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/versions/{version}/zip": {
      "post": {
        "operationId": "dashboard_sites.put_zip",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Upload the package as one zip (application/octet-stream); ?complete=false to add more files after",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/viewers": {
      "post": {
        "operationId": "dashboard_sites.invite",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "emails": {
                    "items": {
                      "format": "email",
                      "maxLength": 254,
                      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                      "type": "string"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  },
                  "valid_days": {
                    "maximum": 30,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "emails"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Invite viewers by email (mode people); each gets a personal single-use link",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboard-sites/{site}/viewers/revoke": {
      "post": {
        "operationId": "dashboard_sites.revoke_viewer",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "site",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "format": "email",
                    "maxLength": 254,
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                    "type": "string"
                  },
                  "viewer_id": {
                    "maxLength": 64,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Remove one viewer; only that person's sessions end",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/dashboards": {
      "get": {
        "operationId": "dashboards.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "List dashboards",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "dashboards.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "access": {
                    "enum": [
                      "link",
                      "password",
                      "key"
                    ],
                    "type": "string"
                  },
                  "allowed_origins": {
                    "items": {
                      "pattern": "^(https:\\/\\/[a-z0-9.-]+(:\\d+)?|http:\\/\\/(localhost|127\\.0\\.0\\.1)(:\\d+)?)$",
                      "type": "string"
                    },
                    "maxItems": 10,
                    "minItems": 1,
                    "type": "array"
                  },
                  "expires_at": {
                    "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                    "type": "string"
                  },
                  "expires_in_days": {
                    "anyOf": [
                      {
                        "maximum": 365,
                        "minimum": 1,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expires_in_hours": {
                    "maximum": 8760,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "layout": {
                    "additionalProperties": false,
                    "properties": {
                      "columns": {
                        "maximum": 4,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "rows": {
                        "items": {
                          "items": {
                            "maximum": 11,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "maxItems": 4,
                          "minItems": 1,
                          "type": "array"
                        },
                        "maxItems": 12,
                        "minItems": 1,
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "panels": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "aggregate": {
                          "additionalProperties": false,
                          "properties": {
                            "explain": {
                              "type": "boolean"
                            },
                            "group_by": {
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "bucket": {
                                        "enum": [
                                          "hour",
                                          "day",
                                          "week",
                                          "month",
                                          "year"
                                        ],
                                        "type": "string"
                                      },
                                      "field": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field",
                                      "bucket"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              },
                              "maxItems": 3,
                              "type": "array"
                            },
                            "include_archived": {
                              "default": false,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 100,
                              "maximum": 1000,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "metrics": {
                              "default": [
                                {
                                  "op": "count"
                                }
                              ],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "as": {
                                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                    "type": "string"
                                  },
                                  "field": {
                                    "type": "string"
                                  },
                                  "op": {
                                    "enum": [
                                      "count",
                                      "sum",
                                      "avg",
                                      "min",
                                      "max"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "op"
                                ],
                                "type": "object"
                              },
                              "maxItems": 10,
                              "minItems": 1,
                              "type": "array"
                            },
                            "object": {
                              "type": "string"
                            },
                            "sort": {
                              "additionalProperties": false,
                              "properties": {
                                "by": {
                                  "type": "string"
                                },
                                "order": {
                                  "default": "desc",
                                  "enum": [
                                    "asc",
                                    "desc"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "by"
                              ],
                              "type": "object"
                            },
                            "where": {
                              "additionalProperties": false,
                              "properties": {
                                "all": {
                                  "items": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "direction": {
                                            "default": "outgoing",
                                            "enum": [
                                              "outgoing",
                                              "incoming"
                                            ],
                                            "type": "string"
                                          },
                                          "relationship": {
                                            "type": "string"
                                          },
                                          "where": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "all": {
                                                "items": {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "field": {
                                                      "type": "string"
                                                    },
                                                    "op": {
                                                      "enum": [
                                                        "eq",
                                                        "neq",
                                                        "in",
                                                        "lt",
                                                        "lte",
                                                        "gt",
                                                        "gte",
                                                        "is_null",
                                                        "is_not_null",
                                                        "contains",
                                                        "starts_with",
                                                        "has_any",
                                                        "has_all",
                                                        "within_bbox",
                                                        "near",
                                                        "has"
                                                      ],
                                                      "type": "string"
                                                    },
                                                    "path": {
                                                      "maxLength": 400,
                                                      "type": "string"
                                                    },
                                                    "value": {}
                                                  },
                                                  "required": [
                                                    "field",
                                                    "op"
                                                  ],
                                                  "type": "object"
                                                },
                                                "maxItems": 20,
                                                "type": "array"
                                              }
                                            },
                                            "required": [
                                              "all"
                                            ],
                                            "type": "object"
                                          }
                                        },
                                        "required": [
                                          "relationship",
                                          "where"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "maxItems": 20,
                                  "type": "array"
                                }
                              },
                              "required": [
                                "all"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "object"
                          ],
                          "type": "object"
                        },
                        "column_formats": {
                          "additionalProperties": {
                            "additionalProperties": false,
                            "properties": {
                              "currency": {
                                "pattern": "^[A-Z]{3}$",
                                "type": "string"
                              },
                              "decimals": {
                                "maximum": 6,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "style": {
                                "enum": [
                                  "number",
                                  "integer",
                                  "percent",
                                  "currency",
                                  "compact",
                                  "date",
                                  "datetime",
                                  "month",
                                  "text"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "style"
                            ],
                            "type": "object"
                          },
                          "propertyNames": {
                            "maxLength": 100,
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "display": {
                          "enum": [
                            "number",
                            "bar",
                            "line",
                            "table"
                          ],
                          "type": "string"
                        },
                        "fields": {
                          "items": {
                            "type": "string"
                          },
                          "maxItems": 12,
                          "type": "array"
                        },
                        "format": {
                          "additionalProperties": false,
                          "properties": {
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "decimals": {
                              "maximum": 6,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "style": {
                              "enum": [
                                "number",
                                "integer",
                                "percent",
                                "currency",
                                "compact",
                                "date",
                                "datetime",
                                "month",
                                "text"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "style"
                          ],
                          "type": "object"
                        },
                        "metric": {
                          "maxLength": 100,
                          "minLength": 1,
                          "type": "string"
                        },
                        "query": {
                          "additionalProperties": false,
                          "properties": {
                            "cursor": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "explain": {
                              "type": "boolean"
                            },
                            "fields": {
                              "items": {
                                "type": "string"
                              },
                              "maxItems": 200,
                              "minItems": 1,
                              "type": "array"
                            },
                            "include_archived": {
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 50,
                              "maximum": 200,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "object": {
                              "type": "string"
                            },
                            "rollups": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "as": {
                                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                    "type": "string"
                                  },
                                  "direction": {
                                    "default": "outgoing",
                                    "enum": [
                                      "outgoing",
                                      "incoming"
                                    ],
                                    "type": "string"
                                  },
                                  "field": {
                                    "type": "string"
                                  },
                                  "op": {
                                    "enum": [
                                      "count",
                                      "sum",
                                      "avg",
                                      "min",
                                      "max"
                                    ],
                                    "type": "string"
                                  },
                                  "relationship": {
                                    "type": "string"
                                  },
                                  "where": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "all": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "field": {
                                              "type": "string"
                                            },
                                            "op": {
                                              "enum": [
                                                "eq",
                                                "neq",
                                                "in",
                                                "lt",
                                                "lte",
                                                "gt",
                                                "gte",
                                                "is_null",
                                                "is_not_null",
                                                "contains",
                                                "starts_with",
                                                "has_any",
                                                "has_all",
                                                "within_bbox",
                                                "near",
                                                "has"
                                              ],
                                              "type": "string"
                                            },
                                            "path": {
                                              "maxLength": 400,
                                              "type": "string"
                                            },
                                            "value": {}
                                          },
                                          "required": [
                                            "field",
                                            "op"
                                          ],
                                          "type": "object"
                                        },
                                        "maxItems": 20,
                                        "type": "array"
                                      }
                                    },
                                    "required": [
                                      "all"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "as",
                                  "relationship",
                                  "op"
                                ],
                                "type": "object"
                              },
                              "maxItems": 5,
                              "type": "array"
                            },
                            "sort": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "field": {
                                    "type": "string"
                                  },
                                  "order": {
                                    "default": "asc",
                                    "enum": [
                                      "asc",
                                      "desc"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "field"
                                ],
                                "type": "object"
                              },
                              "maxItems": 1,
                              "type": "array"
                            },
                            "where": {
                              "additionalProperties": false,
                              "properties": {
                                "all": {
                                  "items": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "direction": {
                                            "default": "outgoing",
                                            "enum": [
                                              "outgoing",
                                              "incoming"
                                            ],
                                            "type": "string"
                                          },
                                          "relationship": {
                                            "type": "string"
                                          },
                                          "where": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "all": {
                                                "items": {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "field": {
                                                      "type": "string"
                                                    },
                                                    "op": {
                                                      "enum": [
                                                        "eq",
                                                        "neq",
                                                        "in",
                                                        "lt",
                                                        "lte",
                                                        "gt",
                                                        "gte",
                                                        "is_null",
                                                        "is_not_null",
                                                        "contains",
                                                        "starts_with",
                                                        "has_any",
                                                        "has_all",
                                                        "within_bbox",
                                                        "near",
                                                        "has"
                                                      ],
                                                      "type": "string"
                                                    },
                                                    "path": {
                                                      "maxLength": 400,
                                                      "type": "string"
                                                    },
                                                    "value": {}
                                                  },
                                                  "required": [
                                                    "field",
                                                    "op"
                                                  ],
                                                  "type": "object"
                                                },
                                                "maxItems": 20,
                                                "type": "array"
                                              }
                                            },
                                            "required": [
                                              "all"
                                            ],
                                            "type": "object"
                                          }
                                        },
                                        "required": [
                                          "relationship",
                                          "where"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "maxItems": 20,
                                  "type": "array"
                                }
                              },
                              "required": [
                                "all"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "object"
                          ],
                          "type": "object"
                        },
                        "title": {
                          "maxLength": 100,
                          "minLength": 1,
                          "type": "string"
                        },
                        "width": {
                          "maximum": 4,
                          "minimum": 1,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "title"
                      ],
                      "type": "object"
                    },
                    "maxItems": 12,
                    "minItems": 1,
                    "type": "array"
                  },
                  "password": {
                    "maxLength": 200,
                    "minLength": 10,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "title",
                  "panels"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Create a live read-only data link for a dashboard you design",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/dashboards/{dashboard}": {
      "delete": {
        "operationId": "dashboards.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dashboard",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Revoke a dashboard link",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "dashboards.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dashboard",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "A dashboard's definition (panels, layout, version) and its last versions (?version=N for one)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "dashboards.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dashboard",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "access": {
                    "enum": [
                      "link",
                      "password",
                      "key"
                    ],
                    "type": "string"
                  },
                  "allowed_origins": {
                    "items": {
                      "pattern": "^(https:\\/\\/[a-z0-9.-]+(:\\d+)?|http:\\/\\/(localhost|127\\.0\\.0\\.1)(:\\d+)?)$",
                      "type": "string"
                    },
                    "maxItems": 10,
                    "minItems": 1,
                    "type": "array"
                  },
                  "clear_allowed_origins": {
                    "type": "boolean"
                  },
                  "clear_expiry": {
                    "type": "boolean"
                  },
                  "expires_at": {
                    "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                    "type": "string"
                  },
                  "expires_in_days": {
                    "anyOf": [
                      {
                        "maximum": 365,
                        "minimum": 1,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expires_in_hours": {
                    "maximum": 8760,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "layout": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "columns": {
                            "maximum": 4,
                            "minimum": 1,
                            "type": "integer"
                          },
                          "rows": {
                            "items": {
                              "items": {
                                "maximum": 11,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxItems": 4,
                              "minItems": 1,
                              "type": "array"
                            },
                            "maxItems": 12,
                            "minItems": 1,
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "panels": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "aggregate": {
                          "additionalProperties": false,
                          "properties": {
                            "explain": {
                              "type": "boolean"
                            },
                            "group_by": {
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "bucket": {
                                        "enum": [
                                          "hour",
                                          "day",
                                          "week",
                                          "month",
                                          "year"
                                        ],
                                        "type": "string"
                                      },
                                      "field": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field",
                                      "bucket"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              },
                              "maxItems": 3,
                              "type": "array"
                            },
                            "include_archived": {
                              "default": false,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 100,
                              "maximum": 1000,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "metrics": {
                              "default": [
                                {
                                  "op": "count"
                                }
                              ],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "as": {
                                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                    "type": "string"
                                  },
                                  "field": {
                                    "type": "string"
                                  },
                                  "op": {
                                    "enum": [
                                      "count",
                                      "sum",
                                      "avg",
                                      "min",
                                      "max"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "op"
                                ],
                                "type": "object"
                              },
                              "maxItems": 10,
                              "minItems": 1,
                              "type": "array"
                            },
                            "object": {
                              "type": "string"
                            },
                            "sort": {
                              "additionalProperties": false,
                              "properties": {
                                "by": {
                                  "type": "string"
                                },
                                "order": {
                                  "default": "desc",
                                  "enum": [
                                    "asc",
                                    "desc"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "by"
                              ],
                              "type": "object"
                            },
                            "where": {
                              "additionalProperties": false,
                              "properties": {
                                "all": {
                                  "items": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "direction": {
                                            "default": "outgoing",
                                            "enum": [
                                              "outgoing",
                                              "incoming"
                                            ],
                                            "type": "string"
                                          },
                                          "relationship": {
                                            "type": "string"
                                          },
                                          "where": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "all": {
                                                "items": {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "field": {
                                                      "type": "string"
                                                    },
                                                    "op": {
                                                      "enum": [
                                                        "eq",
                                                        "neq",
                                                        "in",
                                                        "lt",
                                                        "lte",
                                                        "gt",
                                                        "gte",
                                                        "is_null",
                                                        "is_not_null",
                                                        "contains",
                                                        "starts_with",
                                                        "has_any",
                                                        "has_all",
                                                        "within_bbox",
                                                        "near",
                                                        "has"
                                                      ],
                                                      "type": "string"
                                                    },
                                                    "path": {
                                                      "maxLength": 400,
                                                      "type": "string"
                                                    },
                                                    "value": {}
                                                  },
                                                  "required": [
                                                    "field",
                                                    "op"
                                                  ],
                                                  "type": "object"
                                                },
                                                "maxItems": 20,
                                                "type": "array"
                                              }
                                            },
                                            "required": [
                                              "all"
                                            ],
                                            "type": "object"
                                          }
                                        },
                                        "required": [
                                          "relationship",
                                          "where"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "maxItems": 20,
                                  "type": "array"
                                }
                              },
                              "required": [
                                "all"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "object"
                          ],
                          "type": "object"
                        },
                        "column_formats": {
                          "additionalProperties": {
                            "additionalProperties": false,
                            "properties": {
                              "currency": {
                                "pattern": "^[A-Z]{3}$",
                                "type": "string"
                              },
                              "decimals": {
                                "maximum": 6,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "style": {
                                "enum": [
                                  "number",
                                  "integer",
                                  "percent",
                                  "currency",
                                  "compact",
                                  "date",
                                  "datetime",
                                  "month",
                                  "text"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "style"
                            ],
                            "type": "object"
                          },
                          "propertyNames": {
                            "maxLength": 100,
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "display": {
                          "enum": [
                            "number",
                            "bar",
                            "line",
                            "table"
                          ],
                          "type": "string"
                        },
                        "fields": {
                          "items": {
                            "type": "string"
                          },
                          "maxItems": 12,
                          "type": "array"
                        },
                        "format": {
                          "additionalProperties": false,
                          "properties": {
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "decimals": {
                              "maximum": 6,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "style": {
                              "enum": [
                                "number",
                                "integer",
                                "percent",
                                "currency",
                                "compact",
                                "date",
                                "datetime",
                                "month",
                                "text"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "style"
                          ],
                          "type": "object"
                        },
                        "metric": {
                          "maxLength": 100,
                          "minLength": 1,
                          "type": "string"
                        },
                        "query": {
                          "additionalProperties": false,
                          "properties": {
                            "cursor": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "explain": {
                              "type": "boolean"
                            },
                            "fields": {
                              "items": {
                                "type": "string"
                              },
                              "maxItems": 200,
                              "minItems": 1,
                              "type": "array"
                            },
                            "include_archived": {
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 50,
                              "maximum": 200,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "object": {
                              "type": "string"
                            },
                            "rollups": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "as": {
                                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                    "type": "string"
                                  },
                                  "direction": {
                                    "default": "outgoing",
                                    "enum": [
                                      "outgoing",
                                      "incoming"
                                    ],
                                    "type": "string"
                                  },
                                  "field": {
                                    "type": "string"
                                  },
                                  "op": {
                                    "enum": [
                                      "count",
                                      "sum",
                                      "avg",
                                      "min",
                                      "max"
                                    ],
                                    "type": "string"
                                  },
                                  "relationship": {
                                    "type": "string"
                                  },
                                  "where": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "all": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "field": {
                                              "type": "string"
                                            },
                                            "op": {
                                              "enum": [
                                                "eq",
                                                "neq",
                                                "in",
                                                "lt",
                                                "lte",
                                                "gt",
                                                "gte",
                                                "is_null",
                                                "is_not_null",
                                                "contains",
                                                "starts_with",
                                                "has_any",
                                                "has_all",
                                                "within_bbox",
                                                "near",
                                                "has"
                                              ],
                                              "type": "string"
                                            },
                                            "path": {
                                              "maxLength": 400,
                                              "type": "string"
                                            },
                                            "value": {}
                                          },
                                          "required": [
                                            "field",
                                            "op"
                                          ],
                                          "type": "object"
                                        },
                                        "maxItems": 20,
                                        "type": "array"
                                      }
                                    },
                                    "required": [
                                      "all"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "as",
                                  "relationship",
                                  "op"
                                ],
                                "type": "object"
                              },
                              "maxItems": 5,
                              "type": "array"
                            },
                            "sort": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "field": {
                                    "type": "string"
                                  },
                                  "order": {
                                    "default": "asc",
                                    "enum": [
                                      "asc",
                                      "desc"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "field"
                                ],
                                "type": "object"
                              },
                              "maxItems": 1,
                              "type": "array"
                            },
                            "where": {
                              "additionalProperties": false,
                              "properties": {
                                "all": {
                                  "items": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "direction": {
                                            "default": "outgoing",
                                            "enum": [
                                              "outgoing",
                                              "incoming"
                                            ],
                                            "type": "string"
                                          },
                                          "relationship": {
                                            "type": "string"
                                          },
                                          "where": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "all": {
                                                "items": {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "field": {
                                                      "type": "string"
                                                    },
                                                    "op": {
                                                      "enum": [
                                                        "eq",
                                                        "neq",
                                                        "in",
                                                        "lt",
                                                        "lte",
                                                        "gt",
                                                        "gte",
                                                        "is_null",
                                                        "is_not_null",
                                                        "contains",
                                                        "starts_with",
                                                        "has_any",
                                                        "has_all",
                                                        "within_bbox",
                                                        "near",
                                                        "has"
                                                      ],
                                                      "type": "string"
                                                    },
                                                    "path": {
                                                      "maxLength": 400,
                                                      "type": "string"
                                                    },
                                                    "value": {}
                                                  },
                                                  "required": [
                                                    "field",
                                                    "op"
                                                  ],
                                                  "type": "object"
                                                },
                                                "maxItems": 20,
                                                "type": "array"
                                              }
                                            },
                                            "required": [
                                              "all"
                                            ],
                                            "type": "object"
                                          }
                                        },
                                        "required": [
                                          "relationship",
                                          "where"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "maxItems": 20,
                                  "type": "array"
                                }
                              },
                              "required": [
                                "all"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "object"
                          ],
                          "type": "object"
                        },
                        "title": {
                          "maxLength": 100,
                          "minLength": 1,
                          "type": "string"
                        },
                        "width": {
                          "maximum": 4,
                          "minimum": 1,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "title"
                      ],
                      "type": "object"
                    },
                    "maxItems": 12,
                    "minItems": 1,
                    "type": "array"
                  },
                  "password": {
                    "maxLength": 200,
                    "minLength": 10,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Change title, panels, layout (with version) and sharing: access, password, expiry, allowed origins",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/dashboards/{dashboard}/rotate-token": {
      "post": {
        "operationId": "dashboards.rotate_token",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "dashboard",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "New link (token) for the same dashboard id; the old link stops at once",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/delete": {
      "post": {
        "operationId": "workspaces.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "confirm_name": {
                    "description": "The workspace name, typed by the person exactly as shown (case-sensitive).",
                    "maxLength": 200,
                    "type": "string"
                  }
                },
                "required": [
                  "confirm_name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Schedule the workspace for deletion after 30 days; read-only and offline meanwhile (explorer only since rc.8: API keys and OAuth tokens get FORBIDDEN, reason explorer_only)",
        "tags": [
          "workspaces"
        ],
        "x-agentdb-category": "workspaces",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/direct-channels": {
      "post": {
        "operationId": "channels.direct.open",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "with": {
                    "pattern": "^(agent:agt_[a-z2-7]{26}|user:acc_[a-z2-7]{26}|key:key_[a-z2-7]{26})$",
                    "type": "string"
                  }
                },
                "required": [
                  "with"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "channels direct open",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/docs": {
      "get": {
        "operationId": "schema.docs",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "API and schema docs generated from this workspace (?format=markdown, ?object=)",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/duplicates": {
      "post": {
        "operationId": "records.duplicates",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "fields": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 5,
                    "minItems": 1,
                    "type": "array"
                  },
                  "level": {
                    "enum": [
                      "exact",
                      "trim",
                      "case",
                      "accents",
                      "punctuation",
                      "company"
                    ],
                    "type": "string"
                  },
                  "limit": {
                    "default": 50,
                    "maximum": 200,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "mode": {
                    "default": "normalized",
                    "enum": [
                      "exact",
                      "normalized",
                      "similar"
                    ],
                    "type": "string"
                  },
                  "object": {
                    "type": "string"
                  },
                  "threshold": {
                    "default": 0.8,
                    "maximum": 1,
                    "minimum": 0.5,
                    "type": "number"
                  },
                  "where": {
                    "additionalProperties": false,
                    "properties": {
                      "all": {
                        "items": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "in",
                                    "lt",
                                    "lte",
                                    "gt",
                                    "gte",
                                    "is_null",
                                    "is_not_null",
                                    "contains",
                                    "starts_with",
                                    "has_any",
                                    "has_all",
                                    "within_bbox",
                                    "near",
                                    "has"
                                  ],
                                  "type": "string"
                                },
                                "path": {
                                  "maxLength": 400,
                                  "type": "string"
                                },
                                "value": {}
                              },
                              "required": [
                                "field",
                                "op"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "direction": {
                                  "default": "outgoing",
                                  "enum": [
                                    "outgoing",
                                    "incoming"
                                  ],
                                  "type": "string"
                                },
                                "relationship": {
                                  "type": "string"
                                },
                                "where": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "all": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "all"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "relationship",
                                "where"
                              ],
                              "type": "object"
                            }
                          ]
                        },
                        "maxItems": 20,
                        "type": "array"
                      }
                    },
                    "required": [
                      "all"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "object",
                  "fields"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records duplicates",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/export": {
      "get": {
        "operationId": "records.export",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Data export for owners and admins (?format=ndjson|bundle, ?include_files=false, ?objects=a,b)",
        "tags": [
          "import_export"
        ],
        "x-agentdb-category": "import_export",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/file-links": {
      "get": {
        "operationId": "files.link.list_all",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Signed file links of the workspace",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/file-links/{link}": {
      "delete": {
        "operationId": "files.link.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Revoke a signed file link",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files": {
      "get": {
        "operationId": "files.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "record_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "pending",
                "ready"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "folder",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "recursive",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "enum": [
                    "true",
                    "false"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "maxLength": 50,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "enum": [
                "image",
                "audio",
                "video",
                "text",
                "document",
                "archive",
                "other"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files list",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "files.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "content_type": {
                    "type": "string"
                  },
                  "filename": {
                    "maxLength": 255,
                    "minLength": 1,
                    "type": "string"
                  },
                  "folder": {
                    "maxLength": 255,
                    "type": "string"
                  },
                  "sha256": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "size": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "tags": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 20,
                    "type": "array"
                  }
                },
                "required": [
                  "filename",
                  "content_type",
                  "size"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files create",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files/search": {
      "post": {
        "operationId": "files.search",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "folder": {
                    "maxLength": 255,
                    "type": "string"
                  },
                  "kind": {
                    "enum": [
                      "image",
                      "audio",
                      "video",
                      "text",
                      "document",
                      "archive",
                      "other"
                    ],
                    "type": "string"
                  },
                  "limit": {
                    "default": 20,
                    "maximum": 50,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "query": {
                    "maxLength": 200,
                    "minLength": 2,
                    "type": "string"
                  },
                  "recursive": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "enum": [
                          "true",
                          "false"
                        ],
                        "type": "string"
                      }
                    ]
                  },
                  "tag": {
                    "maxLength": 50,
                    "type": "string"
                  }
                },
                "required": [
                  "query"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files search",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files/{file}": {
      "delete": {
        "operationId": "files.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "force": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files delete",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "files.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files get",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "files.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "filename": {
                    "maxLength": 255,
                    "minLength": 1,
                    "type": "string"
                  },
                  "folder": {
                    "anyOf": [
                      {
                        "maxLength": 255,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tags": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 20,
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files update",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files/{file}/content": {
      "get": {
        "operationId": "files.content.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Download file bytes (Range: bytes=a-b supported)",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "files.content.patch",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Resumable upload: one part at Upload-Offset (application/octet-stream)",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "put": {
        "operationId": "files.content.put",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Upload file bytes (application/octet-stream)",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files/{file}/links": {
      "get": {
        "operationId": "files.link.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Signed links of a file",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "files.link.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "disposition": {
                    "enum": [
                      "inline",
                      "attachment"
                    ],
                    "type": "string"
                  },
                  "expires_in_seconds": {
                    "default": 3600,
                    "maximum": 604800,
                    "minimum": 60,
                    "type": "integer"
                  },
                  "version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Signed, expiring, revocable file link (no API key needed to open it)",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files/{file}/thumbnail": {
      "get": {
        "operationId": "files.thumbnail.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Thumbnail JPEG made by the media worker (rc.8; worker off by default)",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files/{file}/upload": {
      "get": {
        "operationId": "files.upload_status",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "version",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files upload status",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files/{file}/versions": {
      "get": {
        "operationId": "files.versions",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files versions",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "files.version.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "content_type": {
                    "type": "string"
                  },
                  "filename": {
                    "maxLength": 255,
                    "minLength": 1,
                    "type": "string"
                  },
                  "sha256": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "size": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "size"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files version create",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files/{file}/versions/{version}": {
      "delete": {
        "operationId": "files.version.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "files version delete",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files/{file}/versions/{version}/content": {
      "get": {
        "operationId": "files.version.content.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Download one version's bytes (Range supported)",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "files.version.content.patch",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Resumable upload part of a pending version",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "put": {
        "operationId": "files.version.content.put",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Upload the bytes of a pending version",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/files/{file}/waveform": {
      "get": {
        "operationId": "files.waveform.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Audio waveform peaks made by the media worker (rc.8; worker off by default)",
        "tags": [
          "files"
        ],
        "x-agentdb-category": "files",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/flow-runs": {
      "get": {
        "operationId": "flows.runs",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "flow_id",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "succeeded",
                "failed",
                "skipped"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "flows runs",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/flows": {
      "get": {
        "operationId": "flows.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "flows list",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "flows.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "actions": {
                    "items": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "include_record": {
                              "default": false,
                              "type": "boolean"
                            },
                            "type": {
                              "const": "webhook",
                              "type": "string"
                            },
                            "webhook_id": {
                              "maxLength": 64,
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "webhook_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "data": {
                              "additionalProperties": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "type": {
                              "const": "set_field",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "data"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "data": {
                              "additionalProperties": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "links": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "relationship": {
                                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                    "type": "string"
                                  },
                                  "target_key": {
                                    "additionalProperties": {},
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "type": "object"
                                  },
                                  "target_record_id": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "relationship"
                                ],
                                "type": "object"
                              },
                              "maxItems": 20,
                              "type": "array"
                            },
                            "object": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "type": {
                              "const": "create_record",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "object",
                            "data"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "cascade": {
                              "default": [],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "direction": {
                                    "default": "incoming",
                                    "enum": [
                                      "outgoing",
                                      "incoming"
                                    ],
                                    "type": "string"
                                  },
                                  "relationship": {
                                    "maxLength": 64,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "relationship"
                                ],
                                "type": "object"
                              },
                              "maxItems": 5,
                              "type": "array"
                            },
                            "type": {
                              "const": "delete_record",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "data": {
                              "additionalProperties": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "recipient": {
                              "maxLength": 300,
                              "type": "string"
                            },
                            "title": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": {
                              "const": "notify",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "recipient",
                            "title"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "action": {
                              "oneOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "payload": {
                                      "additionalProperties": {},
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "type": {
                                      "const": "webhook",
                                      "type": "string"
                                    },
                                    "webhook_id": {
                                      "maxLength": 64,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "webhook_id"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "data": {
                                      "additionalProperties": {},
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "object": {
                                      "maxLength": 64,
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "create_record",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "object",
                                    "data"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "data": {
                                      "additionalProperties": {},
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "record_id": {
                                      "maxLength": 64,
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "update_record",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "record_id",
                                    "data"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "at": {
                              "maxLength": 40,
                              "type": "string"
                            },
                            "delay_seconds": {
                              "maximum": 31622400,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "name": {
                              "maxLength": 100,
                              "minLength": 1,
                              "type": "string"
                            },
                            "recheck": {
                              "type": "boolean"
                            },
                            "type": {
                              "const": "schedule",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "action"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "input": {
                              "additionalProperties": {},
                              "default": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "justification": {
                              "maxLength": 4000,
                              "type": "string"
                            },
                            "operation": {
                              "maxLength": 64,
                              "minLength": 1,
                              "type": "string"
                            },
                            "params": {
                              "additionalProperties": {
                                "maxLength": 255,
                                "type": "string"
                              },
                              "default": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "type": {
                              "const": "propose",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "operation"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 10,
                    "minItems": 1,
                    "type": "array"
                  },
                  "for_each": {
                    "additionalProperties": false,
                    "properties": {
                      "having": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "op": {
                              "enum": [
                                "eq",
                                "neq",
                                "lt",
                                "lte",
                                "gt",
                                "gte"
                              ],
                              "type": "string"
                            },
                            "rollup": {
                              "maxLength": 63,
                              "type": "string"
                            },
                            "value": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "rollup",
                            "op"
                          ],
                          "type": "object"
                        },
                        "maxItems": 5,
                        "type": "array"
                      },
                      "limit": {
                        "default": 50,
                        "maximum": 200,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "rollups": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "as": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "direction": {
                              "default": "outgoing",
                              "enum": [
                                "outgoing",
                                "incoming"
                              ],
                              "type": "string"
                            },
                            "field": {
                              "type": "string"
                            },
                            "op": {
                              "enum": [
                                "count",
                                "sum",
                                "avg",
                                "min",
                                "max"
                              ],
                              "type": "string"
                            },
                            "relationship": {
                              "type": "string"
                            },
                            "where": {
                              "additionalProperties": false,
                              "properties": {
                                "all": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "field": {
                                        "type": "string"
                                      },
                                      "op": {
                                        "enum": [
                                          "eq",
                                          "neq",
                                          "in",
                                          "lt",
                                          "lte",
                                          "gt",
                                          "gte",
                                          "is_null",
                                          "is_not_null",
                                          "contains",
                                          "starts_with",
                                          "has_any",
                                          "has_all",
                                          "within_bbox",
                                          "near",
                                          "has"
                                        ],
                                        "type": "string"
                                      },
                                      "path": {
                                        "maxLength": 400,
                                        "type": "string"
                                      },
                                      "value": {}
                                    },
                                    "required": [
                                      "field",
                                      "op"
                                    ],
                                    "type": "object"
                                  },
                                  "maxItems": 20,
                                  "type": "array"
                                }
                              },
                              "required": [
                                "all"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "as",
                            "relationship",
                            "op"
                          ],
                          "type": "object"
                        },
                        "maxItems": 5,
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "max_depth": {
                    "default": 3,
                    "maximum": 5,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "status": {
                    "default": "active",
                    "enum": [
                      "active",
                      "paused"
                    ],
                    "type": "string"
                  },
                  "trigger": {
                    "additionalProperties": false,
                    "properties": {
                      "fields": {
                        "items": {
                          "maxLength": 64,
                          "type": "string"
                        },
                        "maxItems": 20,
                        "minItems": 1,
                        "type": "array"
                      },
                      "object": {
                        "maxLength": 64,
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "record.created",
                          "record.updated",
                          "record.deleted",
                          "field.changed",
                          "schedule"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "type": "object"
                  },
                  "where": {
                    "additionalProperties": false,
                    "properties": {
                      "all": {
                        "items": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "in",
                                    "lt",
                                    "lte",
                                    "gt",
                                    "gte",
                                    "is_null",
                                    "is_not_null",
                                    "contains",
                                    "starts_with",
                                    "has_any",
                                    "has_all",
                                    "within_bbox",
                                    "near",
                                    "has"
                                  ],
                                  "type": "string"
                                },
                                "path": {
                                  "maxLength": 400,
                                  "type": "string"
                                },
                                "value": {}
                              },
                              "required": [
                                "field",
                                "op"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "direction": {
                                  "default": "outgoing",
                                  "enum": [
                                    "outgoing",
                                    "incoming"
                                  ],
                                  "type": "string"
                                },
                                "relationship": {
                                  "type": "string"
                                },
                                "where": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "all": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "all"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "relationship",
                                "where"
                              ],
                              "type": "object"
                            }
                          ]
                        },
                        "maxItems": 20,
                        "type": "array"
                      }
                    },
                    "required": [
                      "all"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "name",
                  "trigger",
                  "actions"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "flows create",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/flows/test": {
      "post": {
        "operationId": "flows.test",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "event": {
                    "enum": [
                      "record.created",
                      "record.updated",
                      "record.deleted"
                    ],
                    "type": "string"
                  },
                  "fields": {
                    "items": {
                      "maxLength": 64,
                      "type": "string"
                    },
                    "maxItems": 50,
                    "type": "array"
                  },
                  "flow": {
                    "additionalProperties": false,
                    "properties": {
                      "actions": {
                        "items": {
                          "oneOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "include_record": {
                                  "default": false,
                                  "type": "boolean"
                                },
                                "type": {
                                  "const": "webhook",
                                  "type": "string"
                                },
                                "webhook_id": {
                                  "maxLength": 64,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "webhook_id"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "data": {
                                  "additionalProperties": {},
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "type": {
                                  "const": "set_field",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "data"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "data": {
                                  "additionalProperties": {},
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "links": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "relationship": {
                                        "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                        "type": "string"
                                      },
                                      "target_key": {
                                        "additionalProperties": {},
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "target_record_id": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "relationship"
                                    ],
                                    "type": "object"
                                  },
                                  "maxItems": 20,
                                  "type": "array"
                                },
                                "object": {
                                  "maxLength": 64,
                                  "type": "string"
                                },
                                "type": {
                                  "const": "create_record",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "object",
                                "data"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "cascade": {
                                  "default": [],
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "direction": {
                                        "default": "incoming",
                                        "enum": [
                                          "outgoing",
                                          "incoming"
                                        ],
                                        "type": "string"
                                      },
                                      "relationship": {
                                        "maxLength": 64,
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "relationship"
                                    ],
                                    "type": "object"
                                  },
                                  "maxItems": 5,
                                  "type": "array"
                                },
                                "type": {
                                  "const": "delete_record",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "data": {
                                  "additionalProperties": {},
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "recipient": {
                                  "maxLength": 300,
                                  "type": "string"
                                },
                                "title": {
                                  "maxLength": 200,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "type": {
                                  "const": "notify",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "recipient",
                                "title"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "action": {
                                  "oneOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "payload": {
                                          "additionalProperties": {},
                                          "propertyNames": {
                                            "type": "string"
                                          },
                                          "type": "object"
                                        },
                                        "type": {
                                          "const": "webhook",
                                          "type": "string"
                                        },
                                        "webhook_id": {
                                          "maxLength": 64,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "webhook_id"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "data": {
                                          "additionalProperties": {},
                                          "propertyNames": {
                                            "type": "string"
                                          },
                                          "type": "object"
                                        },
                                        "object": {
                                          "maxLength": 64,
                                          "type": "string"
                                        },
                                        "type": {
                                          "const": "create_record",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "object",
                                        "data"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "data": {
                                          "additionalProperties": {},
                                          "propertyNames": {
                                            "type": "string"
                                          },
                                          "type": "object"
                                        },
                                        "record_id": {
                                          "maxLength": 64,
                                          "type": "string"
                                        },
                                        "type": {
                                          "const": "update_record",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "record_id",
                                        "data"
                                      ],
                                      "type": "object"
                                    }
                                  ]
                                },
                                "at": {
                                  "maxLength": 40,
                                  "type": "string"
                                },
                                "delay_seconds": {
                                  "maximum": 31622400,
                                  "minimum": 1,
                                  "type": "integer"
                                },
                                "name": {
                                  "maxLength": 100,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "recheck": {
                                  "type": "boolean"
                                },
                                "type": {
                                  "const": "schedule",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "action"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "input": {
                                  "additionalProperties": {},
                                  "default": {},
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "justification": {
                                  "maxLength": 4000,
                                  "type": "string"
                                },
                                "operation": {
                                  "maxLength": 64,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "params": {
                                  "additionalProperties": {
                                    "maxLength": 255,
                                    "type": "string"
                                  },
                                  "default": {},
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "type": {
                                  "const": "propose",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "operation"
                              ],
                              "type": "object"
                            }
                          ]
                        },
                        "maxItems": 10,
                        "minItems": 1,
                        "type": "array"
                      },
                      "for_each": {
                        "additionalProperties": false,
                        "properties": {
                          "having": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "maxLength": 64,
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "lt",
                                    "lte",
                                    "gt",
                                    "gte"
                                  ],
                                  "type": "string"
                                },
                                "rollup": {
                                  "maxLength": 63,
                                  "type": "string"
                                },
                                "value": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "rollup",
                                "op"
                              ],
                              "type": "object"
                            },
                            "maxItems": 5,
                            "type": "array"
                          },
                          "limit": {
                            "default": 50,
                            "maximum": 200,
                            "minimum": 1,
                            "type": "integer"
                          },
                          "rollups": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "as": {
                                  "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                  "type": "string"
                                },
                                "direction": {
                                  "default": "outgoing",
                                  "enum": [
                                    "outgoing",
                                    "incoming"
                                  ],
                                  "type": "string"
                                },
                                "field": {
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "count",
                                    "sum",
                                    "avg",
                                    "min",
                                    "max"
                                  ],
                                  "type": "string"
                                },
                                "relationship": {
                                  "type": "string"
                                },
                                "where": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "all": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "all"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "as",
                                "relationship",
                                "op"
                              ],
                              "type": "object"
                            },
                            "maxItems": 5,
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "max_depth": {
                        "default": 3,
                        "maximum": 5,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "name": {
                        "maxLength": 100,
                        "minLength": 1,
                        "type": "string"
                      },
                      "status": {
                        "default": "active",
                        "enum": [
                          "active",
                          "paused"
                        ],
                        "type": "string"
                      },
                      "trigger": {
                        "additionalProperties": false,
                        "properties": {
                          "fields": {
                            "items": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "maxItems": 20,
                            "minItems": 1,
                            "type": "array"
                          },
                          "object": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "enum": [
                              "record.created",
                              "record.updated",
                              "record.deleted",
                              "field.changed",
                              "schedule"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "where": {
                        "additionalProperties": false,
                        "properties": {
                          "all": {
                            "items": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "field": {
                                      "type": "string"
                                    },
                                    "op": {
                                      "enum": [
                                        "eq",
                                        "neq",
                                        "in",
                                        "lt",
                                        "lte",
                                        "gt",
                                        "gte",
                                        "is_null",
                                        "is_not_null",
                                        "contains",
                                        "starts_with",
                                        "has_any",
                                        "has_all",
                                        "within_bbox",
                                        "near",
                                        "has"
                                      ],
                                      "type": "string"
                                    },
                                    "path": {
                                      "maxLength": 400,
                                      "type": "string"
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "field",
                                    "op"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "direction": {
                                      "default": "outgoing",
                                      "enum": [
                                        "outgoing",
                                        "incoming"
                                      ],
                                      "type": "string"
                                    },
                                    "relationship": {
                                      "type": "string"
                                    },
                                    "where": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "all": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "field": {
                                                "type": "string"
                                              },
                                              "op": {
                                                "enum": [
                                                  "eq",
                                                  "neq",
                                                  "in",
                                                  "lt",
                                                  "lte",
                                                  "gt",
                                                  "gte",
                                                  "is_null",
                                                  "is_not_null",
                                                  "contains",
                                                  "starts_with",
                                                  "has_any",
                                                  "has_all",
                                                  "within_bbox",
                                                  "near",
                                                  "has"
                                                ],
                                                "type": "string"
                                              },
                                              "path": {
                                                "maxLength": 400,
                                                "type": "string"
                                              },
                                              "value": {}
                                            },
                                            "required": [
                                              "field",
                                              "op"
                                            ],
                                            "type": "object"
                                          },
                                          "maxItems": 20,
                                          "type": "array"
                                        }
                                      },
                                      "required": [
                                        "all"
                                      ],
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "relationship",
                                    "where"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "maxItems": 20,
                            "type": "array"
                          }
                        },
                        "required": [
                          "all"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "name",
                      "trigger",
                      "actions"
                    ],
                    "type": "object"
                  },
                  "flow_id": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "record_id": {
                    "maxLength": 64,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "flows test",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/flows/{flow}": {
      "delete": {
        "operationId": "flows.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "flow",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "flows delete",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "flows.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "flow",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "flows get",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "flows.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "flow",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "actions": {
                    "items": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "include_record": {
                              "default": false,
                              "type": "boolean"
                            },
                            "type": {
                              "const": "webhook",
                              "type": "string"
                            },
                            "webhook_id": {
                              "maxLength": 64,
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "webhook_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "data": {
                              "additionalProperties": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "type": {
                              "const": "set_field",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "data"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "data": {
                              "additionalProperties": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "links": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "relationship": {
                                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                    "type": "string"
                                  },
                                  "target_key": {
                                    "additionalProperties": {},
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "type": "object"
                                  },
                                  "target_record_id": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "relationship"
                                ],
                                "type": "object"
                              },
                              "maxItems": 20,
                              "type": "array"
                            },
                            "object": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "type": {
                              "const": "create_record",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "object",
                            "data"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "cascade": {
                              "default": [],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "direction": {
                                    "default": "incoming",
                                    "enum": [
                                      "outgoing",
                                      "incoming"
                                    ],
                                    "type": "string"
                                  },
                                  "relationship": {
                                    "maxLength": 64,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "relationship"
                                ],
                                "type": "object"
                              },
                              "maxItems": 5,
                              "type": "array"
                            },
                            "type": {
                              "const": "delete_record",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "data": {
                              "additionalProperties": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "recipient": {
                              "maxLength": 300,
                              "type": "string"
                            },
                            "title": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": {
                              "const": "notify",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "recipient",
                            "title"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "action": {
                              "oneOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "payload": {
                                      "additionalProperties": {},
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "type": {
                                      "const": "webhook",
                                      "type": "string"
                                    },
                                    "webhook_id": {
                                      "maxLength": 64,
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "webhook_id"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "data": {
                                      "additionalProperties": {},
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "object": {
                                      "maxLength": 64,
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "create_record",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "object",
                                    "data"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "data": {
                                      "additionalProperties": {},
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "record_id": {
                                      "maxLength": 64,
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "update_record",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "record_id",
                                    "data"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "at": {
                              "maxLength": 40,
                              "type": "string"
                            },
                            "delay_seconds": {
                              "maximum": 31622400,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "name": {
                              "maxLength": 100,
                              "minLength": 1,
                              "type": "string"
                            },
                            "recheck": {
                              "type": "boolean"
                            },
                            "type": {
                              "const": "schedule",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "action"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "input": {
                              "additionalProperties": {},
                              "default": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "justification": {
                              "maxLength": 4000,
                              "type": "string"
                            },
                            "operation": {
                              "maxLength": 64,
                              "minLength": 1,
                              "type": "string"
                            },
                            "params": {
                              "additionalProperties": {
                                "maxLength": 255,
                                "type": "string"
                              },
                              "default": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "type": {
                              "const": "propose",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "operation"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 10,
                    "minItems": 1,
                    "type": "array"
                  },
                  "for_each": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "having": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "maxLength": 64,
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "lt",
                                    "lte",
                                    "gt",
                                    "gte"
                                  ],
                                  "type": "string"
                                },
                                "rollup": {
                                  "maxLength": 63,
                                  "type": "string"
                                },
                                "value": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "rollup",
                                "op"
                              ],
                              "type": "object"
                            },
                            "maxItems": 5,
                            "type": "array"
                          },
                          "limit": {
                            "default": 50,
                            "maximum": 200,
                            "minimum": 1,
                            "type": "integer"
                          },
                          "rollups": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "as": {
                                  "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                  "type": "string"
                                },
                                "direction": {
                                  "default": "outgoing",
                                  "enum": [
                                    "outgoing",
                                    "incoming"
                                  ],
                                  "type": "string"
                                },
                                "field": {
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "count",
                                    "sum",
                                    "avg",
                                    "min",
                                    "max"
                                  ],
                                  "type": "string"
                                },
                                "relationship": {
                                  "type": "string"
                                },
                                "where": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "all": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "all"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "as",
                                "relationship",
                                "op"
                              ],
                              "type": "object"
                            },
                            "maxItems": 5,
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "max_depth": {
                    "maximum": 5,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "status": {
                    "enum": [
                      "active",
                      "paused"
                    ],
                    "type": "string"
                  },
                  "trigger": {
                    "additionalProperties": false,
                    "properties": {
                      "fields": {
                        "items": {
                          "maxLength": 64,
                          "type": "string"
                        },
                        "maxItems": 20,
                        "minItems": 1,
                        "type": "array"
                      },
                      "object": {
                        "maxLength": 64,
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "record.created",
                          "record.updated",
                          "record.deleted",
                          "field.changed",
                          "schedule"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "type": "object"
                  },
                  "where": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "all": {
                            "items": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "field": {
                                      "type": "string"
                                    },
                                    "op": {
                                      "enum": [
                                        "eq",
                                        "neq",
                                        "in",
                                        "lt",
                                        "lte",
                                        "gt",
                                        "gte",
                                        "is_null",
                                        "is_not_null",
                                        "contains",
                                        "starts_with",
                                        "has_any",
                                        "has_all",
                                        "within_bbox",
                                        "near",
                                        "has"
                                      ],
                                      "type": "string"
                                    },
                                    "path": {
                                      "maxLength": 400,
                                      "type": "string"
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "field",
                                    "op"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "direction": {
                                      "default": "outgoing",
                                      "enum": [
                                        "outgoing",
                                        "incoming"
                                      ],
                                      "type": "string"
                                    },
                                    "relationship": {
                                      "type": "string"
                                    },
                                    "where": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "all": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "field": {
                                                "type": "string"
                                              },
                                              "op": {
                                                "enum": [
                                                  "eq",
                                                  "neq",
                                                  "in",
                                                  "lt",
                                                  "lte",
                                                  "gt",
                                                  "gte",
                                                  "is_null",
                                                  "is_not_null",
                                                  "contains",
                                                  "starts_with",
                                                  "has_any",
                                                  "has_all",
                                                  "within_bbox",
                                                  "near",
                                                  "has"
                                                ],
                                                "type": "string"
                                              },
                                              "path": {
                                                "maxLength": 400,
                                                "type": "string"
                                              },
                                              "value": {}
                                            },
                                            "required": [
                                              "field",
                                              "op"
                                            ],
                                            "type": "object"
                                          },
                                          "maxItems": 20,
                                          "type": "array"
                                        }
                                      },
                                      "required": [
                                        "all"
                                      ],
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "relationship",
                                    "where"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "maxItems": 20,
                            "type": "array"
                          }
                        },
                        "required": [
                          "all"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "flows update",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/form-submissions": {
      "get": {
        "operationId": "forms.submissions",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "form",
            "required": false,
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "accepted",
                "quarantined",
                "released",
                "discarded"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "forms submissions",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/form-submissions/{submission}/review": {
      "post": {
        "operationId": "forms.submission.review",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "submission",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "comment": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "decision": {
                    "enum": [
                      "release",
                      "discard"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "decision"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "forms submission review",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/forms": {
      "get": {
        "operationId": "forms.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "forms list",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "forms.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "allowed_origins": {
                    "anyOf": [
                      {
                        "items": {
                          "pattern": "^(https:\\/\\/[a-z0-9.-]+(:\\d+)?|http:\\/\\/(localhost|127\\.0\\.0\\.1)(:\\d+)?)$",
                          "type": "string"
                        },
                        "maxItems": 20,
                        "minItems": 1,
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "auto_reply": {
                    "additionalProperties": false,
                    "properties": {
                      "email_input": {
                        "pattern": "^[a-z][a-z0-9_]{0,62}$",
                        "type": "string"
                      },
                      "subject": {
                        "maxLength": 200,
                        "minLength": 1,
                        "type": "string"
                      },
                      "text": {
                        "maxLength": 5000,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "email_input",
                      "subject",
                      "text"
                    ],
                    "type": "object"
                  },
                  "challenge": {
                    "default": "none",
                    "enum": [
                      "none",
                      "proof_of_work"
                    ],
                    "type": "string"
                  },
                  "description": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "fields": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "field": {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        },
                        "help": {
                          "maxLength": 500,
                          "type": "string"
                        },
                        "label": {
                          "maxLength": 200,
                          "minLength": 1,
                          "type": "string"
                        },
                        "max_length": {
                          "default": 5000,
                          "maximum": 20000,
                          "minimum": 1,
                          "type": "integer"
                        },
                        "name": {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        },
                        "required": {
                          "default": false,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name",
                        "field",
                        "label"
                      ],
                      "type": "object"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  },
                  "files": {
                    "default": [],
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "content_types": {
                          "default": [
                            "application/pdf",
                            "image/png",
                            "image/jpeg"
                          ],
                          "items": {
                            "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]{0,126}\\/([a-z0-9][a-z0-9!#$&^_.+-]{0,126}|\\*)$",
                            "type": "string"
                          },
                          "maxItems": 20,
                          "minItems": 1,
                          "type": "array"
                        },
                        "help": {
                          "maxLength": 500,
                          "type": "string"
                        },
                        "label": {
                          "maxLength": 200,
                          "minLength": 1,
                          "type": "string"
                        },
                        "max_bytes": {
                          "default": 5242880,
                          "maximum": 26214400,
                          "minimum": 1,
                          "type": "integer"
                        },
                        "name": {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        },
                        "required": {
                          "default": false,
                          "type": "boolean"
                        },
                        "role": {
                          "default": "attachment",
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "label"
                      ],
                      "type": "object"
                    },
                    "maxItems": 5,
                    "type": "array"
                  },
                  "fixed_values": {
                    "additionalProperties": {},
                    "default": {},
                    "propertyNames": {
                      "pattern": "^[a-z][a-z0-9_]{0,62}$",
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "honeypot": {
                    "default": "website",
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "max_bytes": {
                    "default": 16384,
                    "maximum": 65536,
                    "minimum": 512,
                    "type": "integer"
                  },
                  "max_quarantined": {
                    "default": 500,
                    "maximum": 10000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "min_fill_seconds": {
                    "default": 3,
                    "maximum": 3600,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "name": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "notify": {
                    "default": [],
                    "items": {
                      "pattern": "^(agent:agt_[a-z2-7]{26}|user:acc_[a-z2-7]{26}|key:key_[a-z2-7]{26})$",
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  },
                  "object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "pow_difficulty": {
                    "default": 16,
                    "maximum": 24,
                    "minimum": 8,
                    "type": "integer"
                  },
                  "rate_limits": {
                    "additionalProperties": false,
                    "default": {},
                    "properties": {
                      "per_form_per_day": {
                        "default": 2000,
                        "maximum": 100000,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "per_form_per_hour": {
                        "default": 300,
                        "maximum": 100000,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "per_ip_per_hour": {
                        "default": 10,
                        "maximum": 1000,
                        "minimum": 1,
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  },
                  "spam": {
                    "additionalProperties": false,
                    "default": {},
                    "properties": {
                      "block_words": {
                        "default": [],
                        "items": {
                          "maxLength": 100,
                          "minLength": 1,
                          "type": "string"
                        },
                        "maxItems": 200,
                        "type": "array"
                      },
                      "max_links": {
                        "default": 3,
                        "maximum": 100,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "quarantine_all": {
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "default": "active",
                    "enum": [
                      "active",
                      "closed"
                    ],
                    "type": "string"
                  },
                  "success_message": {
                    "default": "Thank you. We received your message.",
                    "maxLength": 500,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "object",
                  "title",
                  "fields"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "forms create",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/forms/{form}": {
      "delete": {
        "operationId": "forms.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "form",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "forms delete",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "forms.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "form",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "forms get",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "forms.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "form",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": {},
                "properties": {
                  "status": {
                    "enum": [
                      "active",
                      "closed"
                    ],
                    "type": "string"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "version"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "forms update",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/forms/{form}/rotate-token": {
      "post": {
        "operationId": "forms.rotate_token",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "form",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "forms rotate token",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/imports": {
      "post": {
        "operationId": "imports.start",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "filename": {
                    "maxLength": 255,
                    "minLength": 1,
                    "type": "string"
                  },
                  "format": {
                    "enum": [
                      "csv",
                      "json",
                      "jsonl"
                    ],
                    "type": "string"
                  },
                  "sha256": {
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  }
                },
                "required": [
                  "filename"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "One-time upload link for a CSV/JSON/JSONL file",
        "tags": [
          "import_export"
        ],
        "x-agentdb-category": "import_export",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/imports/inspect": {
      "post": {
        "operationId": "imports.inspect",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "columns": {
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "file_id": {
                    "type": "string"
                  },
                  "links": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "column": {
                          "type": "string"
                        },
                        "relationship": {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        },
                        "target_field": {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "column",
                        "relationship",
                        "target_field"
                      ],
                      "type": "object"
                    },
                    "maxItems": 10,
                    "type": "array"
                  },
                  "match_on": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 5,
                        "minItems": 1,
                        "type": "array"
                      }
                    ]
                  },
                  "object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "preview_rows": {
                    "default": 5,
                    "maximum": 50,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "upload_id": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Columns, types, match keys and preview of an uploaded file",
        "tags": [
          "import_export"
        ],
        "x-agentdb-category": "import_export",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/imports/run": {
      "post": {
        "operationId": "imports.run",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "approval_id": {
                    "maxLength": 64,
                    "type": "string"
                  },
                  "atomic": {
                    "default": false,
                    "type": "boolean"
                  },
                  "columns": {
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "confirm_uncertain": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "column": {
                          "type": "string"
                        },
                        "confirm_token": {
                          "maxLength": 64,
                          "type": "string"
                        },
                        "from": {
                          "type": "string"
                        },
                        "to": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "column",
                        "from",
                        "to",
                        "confirm_token"
                      ],
                      "type": "object"
                    },
                    "maxItems": 1000,
                    "type": "array"
                  },
                  "dry_run": {
                    "default": false,
                    "type": "boolean"
                  },
                  "file_id": {
                    "type": "string"
                  },
                  "links": {
                    "default": [],
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "column": {
                          "type": "string"
                        },
                        "relationship": {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        },
                        "target_field": {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "column",
                        "relationship",
                        "target_field"
                      ],
                      "type": "object"
                    },
                    "maxItems": 10,
                    "type": "array"
                  },
                  "match_fold": {
                    "default": "exact",
                    "enum": [
                      "exact",
                      "trim",
                      "case"
                    ],
                    "type": "string"
                  },
                  "match_on": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 5,
                        "minItems": 1,
                        "type": "array"
                      }
                    ]
                  },
                  "max_errors": {
                    "default": 200,
                    "maximum": 1000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "max_transformations": {
                    "default": 1000,
                    "maximum": 50000,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "normalize": {
                    "additionalProperties": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "on_missing_match_key": {
                    "default": "error",
                    "enum": [
                      "error",
                      "skip"
                    ],
                    "type": "string"
                  },
                  "on_unresolved_link": {
                    "default": "import_unlinked",
                    "enum": [
                      "import_unlinked",
                      "skip",
                      "reject"
                    ],
                    "type": "string"
                  },
                  "rows": {
                    "additionalProperties": false,
                    "default": {
                      "limit": 10000,
                      "offset": 0
                    },
                    "properties": {
                      "limit": {
                        "default": 10000,
                        "maximum": 10000,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "offset": {
                        "default": 0,
                        "maximum": 9007199254740991,
                        "minimum": 0,
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "file_id",
                  "object",
                  "match_on"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Import an uploaded file (dry_run first)",
        "tags": [
          "import_export"
        ],
        "x-agentdb-category": "import_export",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/inbox": {
      "get": {
        "operationId": "inbox.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "default": "open",
              "enum": [
                "unread",
                "read",
                "done",
                "open",
                "all"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "enum": [
                "mention",
                "assignment",
                "direct",
                "notification"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "inbox list (?wait=1 long-polls up to 25 s)",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/inbox/notify": {
      "post": {
        "operationId": "inbox.notify",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "data": {
                    "additionalProperties": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "recipient": {
                    "pattern": "^(agent:agt_[a-z2-7]{26}|user:acc_[a-z2-7]{26}|key:key_[a-z2-7]{26})$",
                    "type": "string"
                  },
                  "text": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "recipient",
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "inbox notify",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/inbox/{item}": {
      "patch": {
        "operationId": "inbox.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "state": {
                    "enum": [
                      "unread",
                      "read",
                      "done"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "state"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "inbox update",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/indexes": {
      "get": {
        "operationId": "indexes.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include_recommendations",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "recommendations",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "object",
            "required": false,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]{0,62}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "indexes list",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "indexes.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "field": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "name": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "object",
                  "field"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "indexes create",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/indexes/{index}": {
      "delete": {
        "operationId": "indexes.drop",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "index",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "indexes drop",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/integrity": {
      "get": {
        "operationId": "integrity.check",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "object",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "integrity check",
        "tags": [
          "administration"
        ],
        "x-agentdb-category": "administration",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/job-runs": {
      "get": {
        "operationId": "jobs.runs",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "job_id",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "pending",
                "running",
                "succeeded",
                "dead",
                "cancelled"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "jobs runs",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/job-runs/{run}/retry": {
      "post": {
        "operationId": "jobs.retry_run",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "jobs retry run",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/jobs": {
      "get": {
        "operationId": "jobs.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "active",
                "paused",
                "cancelled",
                "completed"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "jobs list",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "jobs.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "payload": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "type": {
                            "const": "webhook",
                            "type": "string"
                          },
                          "webhook_id": {
                            "maxLength": 64,
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "webhook_id"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "data": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "object": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "create_record",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "object",
                          "data"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "data": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "record_id": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "update_record",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "record_id",
                          "data"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "flow_id": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "run_flow",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "flow_id"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "connector_id": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "connector_sync",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "connector_id"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "event_id": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "calendar_reminder",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "event_id"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "max_attempts": {
                    "default": 5,
                    "maximum": 10,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "missed": {
                    "default": "run_once",
                    "enum": [
                      "skip",
                      "run_once",
                      "run_all"
                    ],
                    "type": "string"
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "schedule": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "at": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                            "type": "string"
                          },
                          "type": {
                            "const": "once",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "at"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "expression": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "timezone": {
                            "default": "UTC",
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "cron",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "expression"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "rule": {
                            "maxLength": 1000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "start": {
                            "maxLength": 40,
                            "type": "string"
                          },
                          "timezone": {
                            "default": "UTC",
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "rrule",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "rule"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "status": {
                    "default": "active",
                    "enum": [
                      "active",
                      "paused"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "schedule",
                  "action"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "jobs create",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/jobs/{job}": {
      "get": {
        "operationId": "jobs.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "jobs get",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "jobs.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "payload": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "type": {
                            "const": "webhook",
                            "type": "string"
                          },
                          "webhook_id": {
                            "maxLength": 64,
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "webhook_id"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "data": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "object": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "create_record",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "object",
                          "data"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "data": {
                            "additionalProperties": {},
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "record_id": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "update_record",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "record_id",
                          "data"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "flow_id": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "run_flow",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "flow_id"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "connector_id": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "connector_sync",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "connector_id"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "event_id": {
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "calendar_reminder",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "event_id"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "max_attempts": {
                    "maximum": 10,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "missed": {
                    "enum": [
                      "skip",
                      "run_once",
                      "run_all"
                    ],
                    "type": "string"
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "schedule": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "at": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                            "type": "string"
                          },
                          "type": {
                            "const": "once",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "at"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "expression": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "timezone": {
                            "default": "UTC",
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "cron",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "expression"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "rule": {
                            "maxLength": 1000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "start": {
                            "maxLength": 40,
                            "type": "string"
                          },
                          "timezone": {
                            "default": "UTC",
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "rrule",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "rule"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "active",
                      "paused",
                      "cancelled"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "jobs update",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/jobs/{job}/run": {
      "post": {
        "operationId": "jobs.run_now",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "jobs run now",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/knowledge": {
      "get": {
        "operationId": "knowledge.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "enum": [
                "document",
                "fact",
                "decision",
                "note"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "draft",
                "trusted",
                "archived"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "maxLength": 50,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cites",
            "required": false,
            "schema": {
              "maxLength": 2100,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "pending_review",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "knowledge list",
        "tags": [
          "knowledge"
        ],
        "x-agentdb-category": "knowledge",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "knowledge.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "default": "",
                    "maxLength": 200000,
                    "type": "string"
                  },
                  "confidence": {
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  },
                  "kind": {
                    "default": "fact",
                    "enum": [
                      "document",
                      "fact",
                      "decision",
                      "note"
                    ],
                    "type": "string"
                  },
                  "review_after": {
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                    "type": "string"
                  },
                  "sources": {
                    "default": [],
                    "items": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "file_id": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": {
                              "const": "file",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "file_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "record_id": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "type": {
                              "const": "record",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "record_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "item_id": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": {
                              "const": "item",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "item_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": {
                              "const": "url",
                              "type": "string"
                            },
                            "url": {
                              "maxLength": 2048,
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "url"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "text": {
                              "maxLength": 2000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": {
                              "const": "text",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "tags": {
                    "default": [],
                    "items": {
                      "maxLength": 50,
                      "minLength": 1,
                      "type": "string"
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "title": {
                    "maxLength": 300,
                    "minLength": 1,
                    "type": "string"
                  },
                  "trusted": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "knowledge create",
        "tags": [
          "knowledge"
        ],
        "x-agentdb-category": "knowledge",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/knowledge/search": {
      "post": {
        "operationId": "knowledge.search",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "fresh_only": {
                    "default": false,
                    "type": "boolean"
                  },
                  "include_archived": {
                    "default": false,
                    "type": "boolean"
                  },
                  "kinds": {
                    "items": {
                      "enum": [
                        "document",
                        "fact",
                        "decision",
                        "note"
                      ],
                      "type": "string"
                    },
                    "maxItems": 4,
                    "type": "array"
                  },
                  "limit": {
                    "default": 10,
                    "maximum": 50,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "mode": {
                    "default": "text",
                    "enum": [
                      "exact",
                      "text",
                      "semantic"
                    ],
                    "type": "string"
                  },
                  "query": {
                    "maxLength": 500,
                    "minLength": 1,
                    "type": "string"
                  },
                  "trusted_only": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "query"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "knowledge search",
        "tags": [
          "knowledge"
        ],
        "x-agentdb-category": "knowledge",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/knowledge/{item}": {
      "delete": {
        "operationId": "knowledge.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "confirm": {
                    "default": false,
                    "type": "boolean"
                  },
                  "purge": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "knowledge delete",
        "tags": [
          "knowledge"
        ],
        "x-agentdb-category": "knowledge",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "knowledge.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "knowledge get",
        "tags": [
          "knowledge"
        ],
        "x-agentdb-category": "knowledge",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "knowledge.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "maxLength": 200000,
                    "type": "string"
                  },
                  "confidence": {
                    "anyOf": [
                      {
                        "maximum": 1,
                        "minimum": 0,
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expected_version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "reason": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "review_after": {
                    "anyOf": [
                      {
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sources": {
                    "items": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "file_id": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": {
                              "const": "file",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "file_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "record_id": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "type": {
                              "const": "record",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "record_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "item_id": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": {
                              "const": "item",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "item_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": {
                              "const": "url",
                              "type": "string"
                            },
                            "url": {
                              "maxLength": 2048,
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "url"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "text": {
                              "maxLength": 2000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": {
                              "const": "text",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "status": {
                    "enum": [
                      "draft",
                      "trusted",
                      "archived"
                    ],
                    "type": "string"
                  },
                  "tags": {
                    "items": {
                      "maxLength": 50,
                      "minLength": 1,
                      "type": "string"
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "title": {
                    "maxLength": 300,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "knowledge update",
        "tags": [
          "knowledge"
        ],
        "x-agentdb-category": "knowledge",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/knowledge/{item}/proposals": {
      "post": {
        "operationId": "knowledge.propose",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "maxLength": 200000,
                    "type": "string"
                  },
                  "change": {
                    "default": "update",
                    "enum": [
                      "update",
                      "contradiction"
                    ],
                    "type": "string"
                  },
                  "confidence": {
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  },
                  "reason": {
                    "maxLength": 2000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "sources": {
                    "items": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "file_id": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": {
                              "const": "file",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "file_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "record_id": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "type": {
                              "const": "record",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "record_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "item_id": {
                              "maxLength": 64,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": {
                              "const": "item",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "item_id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "excerpt": {
                              "maxLength": 2000,
                              "type": "string"
                            },
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": {
                              "const": "url",
                              "type": "string"
                            },
                            "url": {
                              "maxLength": 2048,
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "url"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "locator": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "text": {
                              "maxLength": 2000,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": {
                              "const": "text",
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "title": {
                    "maxLength": 300,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "reason"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "knowledge propose",
        "tags": [
          "knowledge"
        ],
        "x-agentdb-category": "knowledge",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/knowledge/{item}/provenance": {
      "get": {
        "operationId": "knowledge.provenance",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "depth",
            "required": false,
            "schema": {
              "default": 3,
              "maximum": 5,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "knowledge provenance",
        "tags": [
          "knowledge"
        ],
        "x-agentdb-category": "knowledge",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/knowledge/{item}/review": {
      "post": {
        "operationId": "knowledge.review",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "decision": {
                    "enum": [
                      "accept",
                      "reject"
                    ],
                    "type": "string"
                  },
                  "force": {
                    "default": false,
                    "type": "boolean"
                  },
                  "note": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "version",
                  "decision"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "knowledge review",
        "tags": [
          "knowledge"
        ],
        "x-agentdb-category": "knowledge",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/knowledge/{item}/versions": {
      "get": {
        "operationId": "knowledge.versions",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "knowledge versions",
        "tags": [
          "knowledge"
        ],
        "x-agentdb-category": "knowledge",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/lifecycle": {
      "get": {
        "operationId": "lifecycle.info",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "object",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "lifecycle info",
        "tags": [
          "administration"
        ],
        "x-agentdb-category": "administration",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/lifecycle/retention": {
      "post": {
        "operationId": "lifecycle.retention.set",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "retention_days": {
                    "anyOf": [
                      {
                        "maximum": 3650,
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "object",
                  "retention_days"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "lifecycle retention set",
        "tags": [
          "administration"
        ],
        "x-agentdb-category": "administration",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/links": {
      "post": {
        "operationId": "links.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "relationship": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "source_record_id": {
                    "type": "string"
                  },
                  "target_record_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "relationship",
                  "source_record_id",
                  "target_record_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "links create",
        "tags": [
          "relationships"
        ],
        "x-agentdb-category": "relationships",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/links/batch": {
      "post": {
        "operationId": "links.create_batch",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "atomic": {
                    "default": true,
                    "type": "boolean"
                  },
                  "links": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "client_ref": {
                          "maxLength": 200,
                          "minLength": 1,
                          "type": "string"
                        },
                        "source_key": {
                          "additionalProperties": {},
                          "propertyNames": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "source_record_id": {
                          "type": "string"
                        },
                        "target_key": {
                          "additionalProperties": {},
                          "propertyNames": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "target_record_id": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "maxItems": 500,
                    "minItems": 1,
                    "type": "array"
                  },
                  "relationship": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "skip_existing": {
                    "default": false,
                    "type": "boolean"
                  },
                  "source_object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  }
                },
                "required": [
                  "source_object",
                  "relationship",
                  "links"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "links create batch",
        "tags": [
          "relationships"
        ],
        "x-agentdb-category": "relationships",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/links/{link}": {
      "delete": {
        "operationId": "links.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "links delete",
        "tags": [
          "relationships"
        ],
        "x-agentdb-category": "relationships",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/members": {
      "get": {
        "operationId": "members.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Owner and members with roles (owner/admin)",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "members.invite",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "maxLength": 254,
                    "type": "string"
                  },
                  "role": {
                    "enum": [
                      "viewer",
                      "editor",
                      "admin"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "role"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Invite a person by email with a role (viewer, editor, admin)",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/members/{member}": {
      "delete": {
        "operationId": "members.remove",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "member",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Remove a member or withdraw an invitation",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "members.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "member",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "role": {
                    "enum": [
                      "viewer",
                      "editor",
                      "admin"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "role"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Change a member's role",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/merge-preview": {
      "post": {
        "operationId": "records.merge_preview",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "merged_ids": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "minItems": 1,
                    "type": "array"
                  },
                  "survivor_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "survivor_id",
                  "merged_ids"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records merge preview",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/merges": {
      "get": {
        "operationId": "records.merges",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "record_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records merges",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/merges/{merge}/undo": {
      "post": {
        "operationId": "records.merge_undo",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "merge",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records merge undo",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/messages/search": {
      "post": {
        "operationId": "messages.search",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "channel_id": {
                    "type": "string"
                  },
                  "limit": {
                    "default": 20,
                    "maximum": 50,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "query": {
                    "maxLength": 200,
                    "minLength": 2,
                    "type": "string"
                  }
                },
                "required": [
                  "query"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "messages search",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/messages/{message}": {
      "delete": {
        "operationId": "messages.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "purge_history": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "messages delete",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "messages.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "messages get",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "messages.edit",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "maxLength": 20000,
                    "type": "string"
                  },
                  "payload": {
                    "anyOf": [
                      {
                        "additionalProperties": {},
                        "propertyNames": {
                          "type": "string"
                        },
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "version": {
                    "maximum": 9007199254740991,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "messages edit",
        "tags": [
          "channels_inbox"
        ],
        "x-agentdb-category": "channels_inbox",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/object-types": {
      "get": {
        "operationId": "schema.inspect",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema inspect",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "schema.object.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "description": {
                    "maxLength": 1000,
                    "type": "string"
                  },
                  "name": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema object create",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/object-types/{object}": {
      "get": {
        "operationId": "schema.object.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema object get",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/object-types/{object}/fields": {
      "post": {
        "operationId": "schema.field.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "description": {
                    "maxLength": 1000,
                    "type": "string"
                  },
                  "enum_values": {
                    "items": {
                      "maxLength": 200,
                      "minLength": 1,
                      "type": "string"
                    },
                    "maxItems": 100,
                    "minItems": 1,
                    "type": "array"
                  },
                  "name": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "options": {
                    "additionalProperties": false,
                    "properties": {
                      "currencies": {
                        "items": {
                          "pattern": "^[A-Z]{3}$",
                          "type": "string"
                        },
                        "maxItems": 300,
                        "minItems": 1,
                        "type": "array"
                      },
                      "expression": {
                        "maxLength": 1000,
                        "minLength": 1,
                        "type": "string"
                      },
                      "initial": {
                        "items": {
                          "maxLength": 200,
                          "minLength": 1,
                          "type": "string"
                        },
                        "maxItems": 100,
                        "minItems": 1,
                        "type": "array"
                      },
                      "item_type": {
                        "enum": [
                          "text",
                          "integer",
                          "number",
                          "decimal",
                          "boolean",
                          "date",
                          "datetime",
                          "time",
                          "email",
                          "url",
                          "phone"
                        ],
                        "type": "string"
                      },
                      "max_items": {
                        "maximum": 1000,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "multiple": {
                        "type": "boolean"
                      },
                      "result_type": {
                        "enum": [
                          "number",
                          "text",
                          "boolean"
                        ],
                        "type": "string"
                      },
                      "scale": {
                        "maximum": 12,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "transitions": {
                        "additionalProperties": {
                          "items": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "maxItems": 100,
                          "type": "array"
                        },
                        "propertyNames": {
                          "maxLength": 200,
                          "minLength": 1,
                          "type": "string"
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "required": {
                    "default": false,
                    "type": "boolean"
                  },
                  "type": {
                    "enum": [
                      "text",
                      "integer",
                      "boolean",
                      "date",
                      "datetime",
                      "enum",
                      "number",
                      "decimal",
                      "currency",
                      "time",
                      "timezone",
                      "duration",
                      "multi_select",
                      "list",
                      "json",
                      "email",
                      "url",
                      "phone",
                      "address",
                      "geo",
                      "rich_text",
                      "formula",
                      "status",
                      "user_ref",
                      "agent_ref",
                      "file",
                      "recurrence"
                    ],
                    "type": "string"
                  },
                  "unique": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema field create",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/object-types/{object}/fields/{field}": {
      "delete": {
        "operationId": "schema.field.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "field",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "confirm": {
                    "default": false,
                    "type": "boolean"
                  },
                  "dry_run": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema field delete",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "schema.field.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "field",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "confirm": {
                    "default": false,
                    "type": "boolean"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "maxLength": 1000,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dry_run": {
                    "default": false,
                    "type": "boolean"
                  },
                  "enum_values": {
                    "items": {
                      "maxLength": 200,
                      "minLength": 1,
                      "type": "string"
                    },
                    "maxItems": 100,
                    "minItems": 1,
                    "type": "array"
                  },
                  "options": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "currencies": {
                            "items": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "maxItems": 300,
                            "minItems": 1,
                            "type": "array"
                          },
                          "expression": {
                            "maxLength": 1000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "initial": {
                            "items": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "maxItems": 100,
                            "minItems": 1,
                            "type": "array"
                          },
                          "item_type": {
                            "enum": [
                              "text",
                              "integer",
                              "number",
                              "decimal",
                              "boolean",
                              "date",
                              "datetime",
                              "time",
                              "email",
                              "url",
                              "phone"
                            ],
                            "type": "string"
                          },
                          "max_items": {
                            "maximum": 1000,
                            "minimum": 1,
                            "type": "integer"
                          },
                          "multiple": {
                            "type": "boolean"
                          },
                          "result_type": {
                            "enum": [
                              "number",
                              "text",
                              "boolean"
                            ],
                            "type": "string"
                          },
                          "scale": {
                            "maximum": 12,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "transitions": {
                            "additionalProperties": {
                              "items": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "maxItems": 100,
                              "type": "array"
                            },
                            "propertyNames": {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "rename_to": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "type": {
                    "enum": [
                      "text",
                      "integer",
                      "boolean",
                      "date",
                      "datetime",
                      "enum",
                      "number",
                      "decimal",
                      "currency",
                      "time",
                      "timezone",
                      "duration",
                      "multi_select",
                      "list",
                      "json",
                      "email",
                      "url",
                      "phone",
                      "address",
                      "geo",
                      "rich_text",
                      "formula",
                      "status",
                      "user_ref",
                      "agent_ref",
                      "file",
                      "recurrence"
                    ],
                    "type": "string"
                  },
                  "unique": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema field update",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/object-types/{object}/rules": {
      "get": {
        "operationId": "schema.object.rules",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema object rules",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "schema.object.rules.set",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "append_only": {
                    "type": "boolean"
                  },
                  "completion_rules": {
                    "anyOf": [
                      {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "direction": {
                              "default": "outgoing",
                              "enum": [
                                "outgoing",
                                "incoming"
                              ],
                              "type": "string"
                            },
                            "field": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "related_field": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "relationship": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "requires": {
                              "items": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "maxItems": 20,
                              "minItems": 1,
                              "type": "array"
                            },
                            "to": {
                              "items": {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              "maxItems": 20,
                              "minItems": 1,
                              "type": "array"
                            }
                          },
                          "required": [
                            "field",
                            "to",
                            "relationship",
                            "requires"
                          ],
                          "type": "object"
                        },
                        "maxItems": 10,
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  }
                },
                "required": [
                  "object"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema object rules set",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/object-types/{object}/unique-keys": {
      "delete": {
        "operationId": "schema.unique_key.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "fields": {
                    "items": {
                      "pattern": "^[a-z][a-z0-9_]{0,62}$",
                      "type": "string"
                    },
                    "maxItems": 5,
                    "minItems": 2,
                    "type": "array"
                  }
                },
                "required": [
                  "fields"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema unique key delete",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "schema.unique_key.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "fields": {
                    "items": {
                      "pattern": "^[a-z][a-z0-9_]{0,62}$",
                      "type": "string"
                    },
                    "maxItems": 5,
                    "minItems": 2,
                    "type": "array"
                  }
                },
                "required": [
                  "fields"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema unique key create",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/packages": {
      "get": {
        "operationId": "packages.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "packages list",
        "tags": [
          "packages_apps"
        ],
        "x-agentdb-category": "packages_apps",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/packages/install": {
      "post": {
        "operationId": "packages.install",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "automations": {
                    "default": false,
                    "type": "boolean"
                  },
                  "dry_run": {
                    "default": false,
                    "type": "boolean"
                  },
                  "package": {
                    "additionalProperties": false,
                    "properties": {
                      "approval_policies": {
                        "default": [],
                        "items": {
                          "additionalProperties": {},
                          "properties": {
                            "name": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "maxItems": 20,
                        "type": "array"
                      },
                      "description": {
                        "maxLength": 2000,
                        "type": "string"
                      },
                      "flows": {
                        "default": [],
                        "items": {
                          "additionalProperties": {},
                          "properties": {
                            "name": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "maxItems": 30,
                        "type": "array"
                      },
                      "jobs": {
                        "default": [],
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "action": {
                              "additionalProperties": {},
                              "propertyNames": {
                                "type": "string"
                              },
                              "type": "object"
                            },
                            "description": {
                              "maxLength": 1000,
                              "type": "string"
                            },
                            "max_attempts": {
                              "default": 5,
                              "maximum": 10,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "missed": {
                              "default": "run_once",
                              "enum": [
                                "skip",
                                "run_once",
                                "run_all"
                              ],
                              "type": "string"
                            },
                            "name": {
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "schedule": {}
                          },
                          "required": [
                            "name",
                            "schedule",
                            "action"
                          ],
                          "type": "object"
                        },
                        "maxItems": 30,
                        "type": "array"
                      },
                      "name": {
                        "pattern": "^[a-z][a-z0-9_]{0,62}$",
                        "type": "string"
                      },
                      "objects": {
                        "default": [],
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "description": {
                              "maxLength": 1000,
                              "type": "string"
                            },
                            "fields": {
                              "default": [],
                              "items": {},
                              "maxItems": 200,
                              "type": "array"
                            },
                            "name": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "unique_keys": {
                              "default": [],
                              "items": {
                                "items": {
                                  "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                  "type": "string"
                                },
                                "maxItems": 5,
                                "minItems": 2,
                                "type": "array"
                              },
                              "maxItems": 20,
                              "type": "array"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "maxItems": 50,
                        "type": "array"
                      },
                      "relationships": {
                        "default": [],
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "acyclic": {
                              "default": false,
                              "type": "boolean"
                            },
                            "cardinality": {
                              "default": "many",
                              "enum": [
                                "one",
                                "many"
                              ],
                              "type": "string"
                            },
                            "description": {
                              "maxLength": 1000,
                              "type": "string"
                            },
                            "name": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "optional": {
                              "default": false,
                              "type": "boolean"
                            },
                            "required": {
                              "default": false,
                              "type": "boolean"
                            },
                            "source_object": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "target_object": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "source_object",
                            "target_object"
                          ],
                          "type": "object"
                        },
                        "maxItems": 100,
                        "type": "array"
                      },
                      "requires": {
                        "default": [],
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "name": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "reason": {
                              "maxLength": 500,
                              "type": "string"
                            },
                            "version": {
                              "pattern": "^\\d+\\.\\d+\\.\\d+$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "maxItems": 20,
                        "type": "array"
                      },
                      "retention": {
                        "default": [],
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "object": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "retention_days": {
                              "maximum": 3650,
                              "minimum": 0,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "object",
                            "retention_days"
                          ],
                          "type": "object"
                        },
                        "maxItems": 50,
                        "type": "array"
                      },
                      "rules": {
                        "default": [],
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "append_only": {
                              "type": "boolean"
                            },
                            "completion_rules": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "direction": {
                                    "default": "outgoing",
                                    "enum": [
                                      "outgoing",
                                      "incoming"
                                    ],
                                    "type": "string"
                                  },
                                  "field": {
                                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                    "type": "string"
                                  },
                                  "related_field": {
                                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                    "type": "string"
                                  },
                                  "relationship": {
                                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                    "type": "string"
                                  },
                                  "requires": {
                                    "items": {
                                      "maxLength": 200,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "maxItems": 20,
                                    "minItems": 1,
                                    "type": "array"
                                  },
                                  "to": {
                                    "items": {
                                      "maxLength": 200,
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "maxItems": 20,
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "field",
                                  "to",
                                  "relationship",
                                  "requires"
                                ],
                                "type": "object"
                              },
                              "maxItems": 10,
                              "type": "array"
                            },
                            "object": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "object"
                          ],
                          "type": "object"
                        },
                        "maxItems": 50,
                        "type": "array"
                      },
                      "templates": {
                        "additionalProperties": false,
                        "properties": {
                          "approval_policies": {
                            "default": [],
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "description": {
                                  "maxLength": 1000,
                                  "type": "string"
                                },
                                "name": {
                                  "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                  "type": "string"
                                },
                                "policy": {
                                  "additionalProperties": {},
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                }
                              },
                              "required": [
                                "name",
                                "description",
                                "policy"
                              ],
                              "type": "object"
                            },
                            "maxItems": 20,
                            "type": "array"
                          },
                          "permissions": {
                            "default": [],
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "description": {
                                  "maxLength": 1000,
                                  "type": "string"
                                },
                                "name": {
                                  "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                  "type": "string"
                                },
                                "rules": {
                                  "items": {
                                    "additionalProperties": {},
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "type": "object"
                                  },
                                  "maxItems": 50,
                                  "minItems": 1,
                                  "type": "array"
                                }
                              },
                              "required": [
                                "name",
                                "description",
                                "rules"
                              ],
                              "type": "object"
                            },
                            "maxItems": 20,
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "version": {
                        "pattern": "^\\d+\\.\\d+\\.\\d+$",
                        "type": "string"
                      },
                      "views": {
                        "default": [],
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "definition": {
                              "additionalProperties": false,
                              "properties": {
                                "display": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "calendar_events": {
                                      "anyOf": [
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "items": {
                                            "maxLength": 64,
                                            "type": "string"
                                          },
                                          "maxItems": 20,
                                          "minItems": 1,
                                          "type": "array"
                                        }
                                      ]
                                    },
                                    "columns": {
                                      "items": {
                                        "maxLength": 200,
                                        "type": "string"
                                      },
                                      "maxItems": 200,
                                      "type": "array"
                                    },
                                    "date_field": {
                                      "maxLength": 200,
                                      "type": "string"
                                    },
                                    "end_field": {
                                      "maxLength": 200,
                                      "type": "string"
                                    },
                                    "fields": {
                                      "items": {
                                        "maxLength": 200,
                                        "type": "string"
                                      },
                                      "maxItems": 50,
                                      "type": "array"
                                    },
                                    "group_by": {
                                      "maxLength": 200,
                                      "type": "string"
                                    },
                                    "hidden_fields": {
                                      "items": {
                                        "maxLength": 200,
                                        "type": "string"
                                      },
                                      "maxItems": 50,
                                      "type": "array"
                                    },
                                    "report": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "chart": {
                                          "default": "bar",
                                          "enum": [
                                            "bar",
                                            "table"
                                          ],
                                          "type": "string"
                                        },
                                        "group_by": {
                                          "default": [],
                                          "items": {
                                            "anyOf": [
                                              {
                                                "maxLength": 200,
                                                "type": "string"
                                              },
                                              {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "bucket": {
                                                    "enum": [
                                                      "hour",
                                                      "day",
                                                      "week",
                                                      "month",
                                                      "year"
                                                    ],
                                                    "type": "string"
                                                  },
                                                  "field": {
                                                    "maxLength": 200,
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "field",
                                                  "bucket"
                                                ],
                                                "type": "object"
                                              }
                                            ]
                                          },
                                          "maxItems": 2,
                                          "type": "array"
                                        },
                                        "metrics": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "field": {
                                                "maxLength": 200,
                                                "type": "string"
                                              },
                                              "op": {
                                                "enum": [
                                                  "count",
                                                  "sum",
                                                  "avg",
                                                  "min",
                                                  "max"
                                                ],
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "op"
                                            ],
                                            "type": "object"
                                          },
                                          "maxItems": 4,
                                          "minItems": 1,
                                          "type": "array"
                                        }
                                      },
                                      "required": [
                                        "metrics"
                                      ],
                                      "type": "object"
                                    },
                                    "title_field": {
                                      "maxLength": 200,
                                      "type": "string"
                                    },
                                    "type": {
                                      "default": "table",
                                      "enum": [
                                        "table",
                                        "list",
                                        "kanban",
                                        "calendar",
                                        "timeline",
                                        "report"
                                      ],
                                      "type": "string"
                                    },
                                    "wip_enforce": {
                                      "type": "boolean"
                                    },
                                    "wip_limits": {
                                      "additionalProperties": {
                                        "maximum": 10000,
                                        "minimum": 1,
                                        "type": "integer"
                                      },
                                      "propertyNames": {
                                        "maxLength": 200,
                                        "type": "string"
                                      },
                                      "type": "object"
                                    }
                                  },
                                  "type": "object"
                                },
                                "fields": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "maxItems": 200,
                                  "minItems": 1,
                                  "type": "array"
                                },
                                "include_archived": {
                                  "type": "boolean"
                                },
                                "limit": {
                                  "maximum": 200,
                                  "minimum": 1,
                                  "type": "integer"
                                },
                                "rollups": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "as": {
                                        "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                        "type": "string"
                                      },
                                      "direction": {
                                        "default": "outgoing",
                                        "enum": [
                                          "outgoing",
                                          "incoming"
                                        ],
                                        "type": "string"
                                      },
                                      "field": {
                                        "type": "string"
                                      },
                                      "op": {
                                        "enum": [
                                          "count",
                                          "sum",
                                          "avg",
                                          "min",
                                          "max"
                                        ],
                                        "type": "string"
                                      },
                                      "relationship": {
                                        "type": "string"
                                      },
                                      "where": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "all": {
                                            "items": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "field": {
                                                  "type": "string"
                                                },
                                                "op": {
                                                  "enum": [
                                                    "eq",
                                                    "neq",
                                                    "in",
                                                    "lt",
                                                    "lte",
                                                    "gt",
                                                    "gte",
                                                    "is_null",
                                                    "is_not_null",
                                                    "contains",
                                                    "starts_with",
                                                    "has_any",
                                                    "has_all",
                                                    "within_bbox",
                                                    "near",
                                                    "has"
                                                  ],
                                                  "type": "string"
                                                },
                                                "path": {
                                                  "maxLength": 400,
                                                  "type": "string"
                                                },
                                                "value": {}
                                              },
                                              "required": [
                                                "field",
                                                "op"
                                              ],
                                              "type": "object"
                                            },
                                            "maxItems": 20,
                                            "type": "array"
                                          }
                                        },
                                        "required": [
                                          "all"
                                        ],
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "as",
                                      "relationship",
                                      "op"
                                    ],
                                    "type": "object"
                                  },
                                  "maxItems": 5,
                                  "type": "array"
                                },
                                "sort": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "field": {
                                        "type": "string"
                                      },
                                      "order": {
                                        "default": "asc",
                                        "enum": [
                                          "asc",
                                          "desc"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field"
                                    ],
                                    "type": "object"
                                  },
                                  "maxItems": 1,
                                  "type": "array"
                                },
                                "where": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "all": {
                                      "items": {
                                        "anyOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "field": {
                                                "type": "string"
                                              },
                                              "op": {
                                                "enum": [
                                                  "eq",
                                                  "neq",
                                                  "in",
                                                  "lt",
                                                  "lte",
                                                  "gt",
                                                  "gte",
                                                  "is_null",
                                                  "is_not_null",
                                                  "contains",
                                                  "starts_with",
                                                  "has_any",
                                                  "has_all",
                                                  "within_bbox",
                                                  "near",
                                                  "has"
                                                ],
                                                "type": "string"
                                              },
                                              "path": {
                                                "maxLength": 400,
                                                "type": "string"
                                              },
                                              "value": {}
                                            },
                                            "required": [
                                              "field",
                                              "op"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "direction": {
                                                "default": "outgoing",
                                                "enum": [
                                                  "outgoing",
                                                  "incoming"
                                                ],
                                                "type": "string"
                                              },
                                              "relationship": {
                                                "type": "string"
                                              },
                                              "where": {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "all": {
                                                    "items": {
                                                      "additionalProperties": false,
                                                      "properties": {
                                                        "field": {
                                                          "type": "string"
                                                        },
                                                        "op": {
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "in",
                                                            "lt",
                                                            "lte",
                                                            "gt",
                                                            "gte",
                                                            "is_null",
                                                            "is_not_null",
                                                            "contains",
                                                            "starts_with",
                                                            "has_any",
                                                            "has_all",
                                                            "within_bbox",
                                                            "near",
                                                            "has"
                                                          ],
                                                          "type": "string"
                                                        },
                                                        "path": {
                                                          "maxLength": 400,
                                                          "type": "string"
                                                        },
                                                        "value": {}
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "type": "object"
                                                    },
                                                    "maxItems": 20,
                                                    "type": "array"
                                                  }
                                                },
                                                "required": [
                                                  "all"
                                                ],
                                                "type": "object"
                                              }
                                            },
                                            "required": [
                                              "relationship",
                                              "where"
                                            ],
                                            "type": "object"
                                          }
                                        ]
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "all"
                                  ],
                                  "type": "object"
                                }
                              },
                              "type": "object"
                            },
                            "description": {
                              "maxLength": 1000,
                              "type": "string"
                            },
                            "name": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "object": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "visibility": {
                              "default": "workspace",
                              "enum": [
                                "private",
                                "workspace"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "object",
                            "definition"
                          ],
                          "type": "object"
                        },
                        "maxItems": 100,
                        "type": "array"
                      }
                    },
                    "required": [
                      "name",
                      "version"
                    ],
                    "type": "object"
                  },
                  "sample_data": {
                    "default": false,
                    "type": "boolean"
                  },
                  "template": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "version": {
                    "pattern": "^\\d+\\.\\d+\\.\\d+$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "packages install",
        "tags": [
          "packages_apps"
        ],
        "x-agentdb-category": "packages_apps",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/packages/{package}": {
      "delete": {
        "operationId": "packages.uninstall",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "package",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "remove_automations": {
                    "default": true,
                    "type": "boolean"
                  },
                  "remove_views": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "packages uninstall",
        "tags": [
          "packages_apps"
        ],
        "x-agentdb-category": "packages_apps",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "packages.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "package",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "packages get",
        "tags": [
          "packages_apps"
        ],
        "x-agentdb-category": "packages_apps",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/permissions": {
      "get": {
        "operationId": "permissions.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "permissions list",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "permissions.set",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "access": {
                    "enum": [
                      "none",
                      "read",
                      "write"
                    ],
                    "type": "string"
                  },
                  "field": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "object": {
                    "anyOf": [
                      {
                        "const": "*",
                        "type": "string"
                      },
                      {
                        "pattern": "^[a-z][a-z0-9_]{0,62}$",
                        "type": "string"
                      }
                    ]
                  },
                  "owner_field": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "subject": {
                    "pattern": "^(role:(viewer|editor)|user:acc_[a-z2-7]{26}|agent:agt_[a-z2-7]{26})$",
                    "type": "string"
                  }
                },
                "required": [
                  "subject",
                  "object",
                  "access"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "permissions set",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/permissions/{rule}": {
      "delete": {
        "operationId": "permissions.remove",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "permissions remove",
        "tags": [
          "access"
        ],
        "x-agentdb-category": "access",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/published-views": {
      "get": {
        "operationId": "views.published.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Published views of the workspace",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/published-views/{published}": {
      "delete": {
        "operationId": "views.published.revoke",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "published",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Revoke a published view at once",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "views.published.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "published",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "access": {
                    "enum": [
                      "link",
                      "password"
                    ],
                    "type": "string"
                  },
                  "allowed_origins": {
                    "items": {
                      "pattern": "^(https:\\/\\/[a-z0-9.-]+(:\\d+)?|http:\\/\\/(localhost|127\\.0\\.0\\.1)(:\\d+)?)$",
                      "type": "string"
                    },
                    "maxItems": 10,
                    "minItems": 1,
                    "type": "array"
                  },
                  "clear_allowed_origins": {
                    "type": "boolean"
                  },
                  "clear_fields": {
                    "type": "boolean"
                  },
                  "expires_at": {
                    "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                    "type": "string"
                  },
                  "expires_in_hours": {
                    "maximum": 8760,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "fields": {
                    "items": {
                      "maxLength": 200,
                      "type": "string"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  },
                  "password": {
                    "maxLength": 200,
                    "minLength": 10,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Change a published view's access, expiry, origins or fields",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/query": {
      "post": {
        "operationId": "records.query",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "cursor": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "explain": {
                    "type": "boolean"
                  },
                  "fields": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 200,
                    "minItems": 1,
                    "type": "array"
                  },
                  "include_archived": {
                    "type": "boolean"
                  },
                  "limit": {
                    "default": 50,
                    "maximum": 200,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "object": {
                    "type": "string"
                  },
                  "rollups": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "as": {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        },
                        "direction": {
                          "default": "outgoing",
                          "enum": [
                            "outgoing",
                            "incoming"
                          ],
                          "type": "string"
                        },
                        "field": {
                          "type": "string"
                        },
                        "op": {
                          "enum": [
                            "count",
                            "sum",
                            "avg",
                            "min",
                            "max"
                          ],
                          "type": "string"
                        },
                        "relationship": {
                          "type": "string"
                        },
                        "where": {
                          "additionalProperties": false,
                          "properties": {
                            "all": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "field": {
                                    "type": "string"
                                  },
                                  "op": {
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "in",
                                      "lt",
                                      "lte",
                                      "gt",
                                      "gte",
                                      "is_null",
                                      "is_not_null",
                                      "contains",
                                      "starts_with",
                                      "has_any",
                                      "has_all",
                                      "within_bbox",
                                      "near",
                                      "has"
                                    ],
                                    "type": "string"
                                  },
                                  "path": {
                                    "maxLength": 400,
                                    "type": "string"
                                  },
                                  "value": {}
                                },
                                "required": [
                                  "field",
                                  "op"
                                ],
                                "type": "object"
                              },
                              "maxItems": 20,
                              "type": "array"
                            }
                          },
                          "required": [
                            "all"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "as",
                        "relationship",
                        "op"
                      ],
                      "type": "object"
                    },
                    "maxItems": 5,
                    "type": "array"
                  },
                  "sort": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "order": {
                          "default": "asc",
                          "enum": [
                            "asc",
                            "desc"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "field"
                      ],
                      "type": "object"
                    },
                    "maxItems": 1,
                    "type": "array"
                  },
                  "where": {
                    "additionalProperties": false,
                    "properties": {
                      "all": {
                        "items": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "in",
                                    "lt",
                                    "lte",
                                    "gt",
                                    "gte",
                                    "is_null",
                                    "is_not_null",
                                    "contains",
                                    "starts_with",
                                    "has_any",
                                    "has_all",
                                    "within_bbox",
                                    "near",
                                    "has"
                                  ],
                                  "type": "string"
                                },
                                "path": {
                                  "maxLength": 400,
                                  "type": "string"
                                },
                                "value": {}
                              },
                              "required": [
                                "field",
                                "op"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "direction": {
                                  "default": "outgoing",
                                  "enum": [
                                    "outgoing",
                                    "incoming"
                                  ],
                                  "type": "string"
                                },
                                "relationship": {
                                  "type": "string"
                                },
                                "where": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "all": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "all"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "relationship",
                                "where"
                              ],
                              "type": "object"
                            }
                          ]
                        },
                        "maxItems": 20,
                        "type": "array"
                      }
                    },
                    "required": [
                      "all"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "object"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records query",
        "tags": [
          "query_search"
        ],
        "x-agentdb-category": "query_search",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records": {
      "post": {
        "operationId": "records.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "data": {
                    "additionalProperties": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "links": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "relationship": {
                          "pattern": "^[a-z][a-z0-9_]{0,62}$",
                          "type": "string"
                        },
                        "target_key": {
                          "additionalProperties": {},
                          "propertyNames": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "target_record_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "relationship"
                      ],
                      "type": "object"
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "object": {
                    "type": "string"
                  }
                },
                "required": [
                  "object",
                  "data"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records create",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/archive": {
      "post": {
        "operationId": "records.archive",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "ids": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 1000,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "ids"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records archive",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/delete": {
      "post": {
        "operationId": "records.delete_batch",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "atomic": {
                    "default": true,
                    "type": "boolean"
                  },
                  "dry_run": {
                    "default": false,
                    "type": "boolean"
                  },
                  "expected_count": {
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "ids": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 1000,
                    "minItems": 1,
                    "type": "array"
                  },
                  "include_archived": {
                    "type": "boolean"
                  },
                  "object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "permanent": {
                    "type": "boolean"
                  },
                  "where": {
                    "additionalProperties": false,
                    "properties": {
                      "all": {
                        "items": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "in",
                                    "lt",
                                    "lte",
                                    "gt",
                                    "gte",
                                    "is_null",
                                    "is_not_null",
                                    "contains",
                                    "starts_with",
                                    "has_any",
                                    "has_all",
                                    "within_bbox",
                                    "near",
                                    "has"
                                  ],
                                  "type": "string"
                                },
                                "path": {
                                  "maxLength": 400,
                                  "type": "string"
                                },
                                "value": {}
                              },
                              "required": [
                                "field",
                                "op"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "direction": {
                                  "default": "outgoing",
                                  "enum": [
                                    "outgoing",
                                    "incoming"
                                  ],
                                  "type": "string"
                                },
                                "relationship": {
                                  "type": "string"
                                },
                                "where": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "all": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "all"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "relationship",
                                "where"
                              ],
                              "type": "object"
                            }
                          ]
                        },
                        "maxItems": 20,
                        "type": "array"
                      }
                    },
                    "required": [
                      "all"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "object"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records delete batch",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/merge": {
      "post": {
        "operationId": "records.merge",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "field_choices": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "default": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "merged_ids": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "minItems": 1,
                    "type": "array"
                  },
                  "survivor_id": {
                    "type": "string"
                  },
                  "versions": {
                    "additionalProperties": {
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991,
                      "type": "integer"
                    },
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "survivor_id",
                  "merged_ids",
                  "versions"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records merge",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/purge": {
      "post": {
        "operationId": "records.purge",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "ids": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 1000,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "ids"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records purge",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/restore": {
      "post": {
        "operationId": "records.restore",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "allow_dropped_values": {
                    "default": false,
                    "type": "boolean"
                  },
                  "dry_run": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ids": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 1000,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "ids"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records restore",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/unarchive": {
      "post": {
        "operationId": "records.unarchive",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "ids": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 1000,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "ids"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records unarchive",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/upsert": {
      "post": {
        "operationId": "records.upsert",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "atomic": {
                    "default": true,
                    "type": "boolean"
                  },
                  "dry_run": {
                    "default": false,
                    "type": "boolean"
                  },
                  "match_fold": {
                    "default": "exact",
                    "enum": [
                      "exact",
                      "trim",
                      "case"
                    ],
                    "type": "string"
                  },
                  "match_on": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 5,
                        "minItems": 1,
                        "type": "array"
                      }
                    ]
                  },
                  "object": {
                    "type": "string"
                  },
                  "on_missing_match_key": {
                    "default": "error",
                    "enum": [
                      "error",
                      "skip"
                    ],
                    "type": "string"
                  },
                  "records": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "client_ref": {
                          "maxLength": 200,
                          "minLength": 1,
                          "type": "string"
                        },
                        "data": {
                          "additionalProperties": {},
                          "propertyNames": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "id": {
                          "type": "string"
                        },
                        "links": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "relationship": {
                                "pattern": "^[a-z][a-z0-9_]{0,62}$",
                                "type": "string"
                              },
                              "target_key": {
                                "additionalProperties": {},
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "target_record_id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "relationship"
                            ],
                            "type": "object"
                          },
                          "maxItems": 20,
                          "type": "array"
                        },
                        "version": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "data"
                      ],
                      "type": "object"
                    },
                    "maxItems": 500,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "object",
                  "match_on",
                  "records"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records upsert",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/upsert-one": {
      "post": {
        "operationId": "records.upsert_one",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "data": {
                    "additionalProperties": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "id": {
                    "type": "string"
                  },
                  "match_on": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 5,
                        "minItems": 1,
                        "type": "array"
                      }
                    ]
                  },
                  "object": {
                    "type": "string"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "object",
                  "match_on",
                  "data"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records upsert one",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/{record}": {
      "delete": {
        "operationId": "records.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "permanent": {
                    "type": "boolean"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records delete",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "records.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records get",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "records.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "data": {
                    "additionalProperties": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "version",
                  "data"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records update",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/{record}/diff": {
      "get": {
        "operationId": "cms.diff",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms diff",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/{record}/dispatch": {
      "post": {
        "operationId": "content.dispatch",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "channel_field": {
                    "default": "channel",
                    "maxLength": 64,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "content dispatch",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:write",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/records/{record}/history": {
      "get": {
        "operationId": "records.history",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records history",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/{record}/publish": {
      "post": {
        "operationId": "cms.publish",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms publish",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/{record}/related": {
      "get": {
        "operationId": "records.related",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "relationship",
            "required": true,
            "schema": {
              "pattern": "^[a-z][a-z0-9_]{0,62}$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "default": "outgoing",
              "enum": [
                "outgoing",
                "incoming"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records related",
        "tags": [
          "relationships"
        ],
        "x-agentdb-category": "relationships",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/{record}/restore-revision": {
      "post": {
        "operationId": "cms.restore",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "revision": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "required": [
                  "revision",
                  "version"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms restore",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/{record}/revisions": {
      "get": {
        "operationId": "cms.revisions",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms revisions",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/{record}/revisions/{revision}": {
      "get": {
        "operationId": "cms.revision.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "revision",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms revision get",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/{record}/schedule-publish": {
      "post": {
        "operationId": "cms.schedule_publish",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "at": {
                    "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                    "type": "string"
                  }
                },
                "required": [
                  "at"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms schedule publish",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/records/{record}/unpublish": {
      "post": {
        "operationId": "cms.unpublish",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "status": {
                    "default": "archived",
                    "maxLength": 64,
                    "minLength": 1,
                    "type": "string"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "cms unpublish",
        "tags": [
          "publishing"
        ],
        "x-agentdb-category": "publishing",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/recycle-bin": {
      "get": {
        "operationId": "records.recycle_bin",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "object",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records recycle bin",
        "tags": [
          "records"
        ],
        "x-agentdb-category": "records",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/relationship-types": {
      "post": {
        "operationId": "schema.relationship.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "acyclic": {
                    "default": false,
                    "type": "boolean"
                  },
                  "cardinality": {
                    "default": "many",
                    "enum": [
                      "one",
                      "many"
                    ],
                    "type": "string"
                  },
                  "description": {
                    "maxLength": 1000,
                    "type": "string"
                  },
                  "name": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "required": {
                    "default": false,
                    "type": "boolean"
                  },
                  "source_object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "target_object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "source_object",
                  "target_object"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema relationship create",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/relationship-types/{object}/{relationship}": {
      "patch": {
        "operationId": "schema.relationship.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "object",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "relationship",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "description": {
                    "anyOf": [
                      {
                        "maxLength": 1000,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dry_run": {
                    "default": false,
                    "type": "boolean"
                  },
                  "required": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema relationship update",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/restore": {
      "post": {
        "operationId": "workspaces.restore",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Cancel a pending deletion; everything resumes as before (explorer only since rc.8: API keys and OAuth tokens get FORBIDDEN, reason explorer_only)",
        "tags": [
          "workspaces"
        ],
        "x-agentdb-category": "workspaces",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/schedule/preview": {
      "post": {
        "operationId": "schedule.preview",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "after": {
                    "maxLength": 40,
                    "type": "string"
                  },
                  "count": {
                    "default": 5,
                    "maximum": 50,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "schedule": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "at": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})$",
                            "type": "string"
                          },
                          "type": {
                            "const": "once",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "at"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "expression": {
                            "maxLength": 200,
                            "minLength": 1,
                            "type": "string"
                          },
                          "timezone": {
                            "default": "UTC",
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "cron",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "expression"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "rule": {
                            "maxLength": 1000,
                            "minLength": 1,
                            "type": "string"
                          },
                          "start": {
                            "maxLength": 40,
                            "type": "string"
                          },
                          "timezone": {
                            "default": "UTC",
                            "maxLength": 64,
                            "type": "string"
                          },
                          "type": {
                            "const": "rrule",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "rule"
                        ],
                        "type": "object"
                      }
                    ]
                  }
                },
                "required": [
                  "schedule"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schedule preview",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/schema": {
      "get": {
        "operationId": "schema.inspect",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema inspect",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/schema/changes/{change}/undo": {
      "post": {
        "operationId": "schema.undo",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "change",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "confirm": {
                    "default": false,
                    "type": "boolean"
                  },
                  "dry_run": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema undo",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/schema/history": {
      "get": {
        "operationId": "schema.history",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "object",
            "required": false,
            "schema": {
              "description": "Only changes to this object",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "field",
            "required": false,
            "schema": {
              "description": "Only changes that touched a field with this name (before or after); needs object",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Cursor: next_before from the previous page",
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "schema history",
        "tags": [
          "schema"
        ],
        "x-agentdb-category": "schema",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/search": {
      "post": {
        "operationId": "records.search",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "cursor": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "fields": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  },
                  "highlight": {
                    "default": true,
                    "type": "boolean"
                  },
                  "include_archived": {
                    "type": "boolean"
                  },
                  "limit": {
                    "default": 20,
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "match": {
                    "default": "all",
                    "enum": [
                      "all",
                      "any"
                    ],
                    "type": "string"
                  },
                  "object": {
                    "type": "string"
                  },
                  "query": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "where": {
                    "additionalProperties": false,
                    "properties": {
                      "all": {
                        "items": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "in",
                                    "lt",
                                    "lte",
                                    "gt",
                                    "gte",
                                    "is_null",
                                    "is_not_null",
                                    "contains",
                                    "starts_with",
                                    "has_any",
                                    "has_all",
                                    "within_bbox",
                                    "near",
                                    "has"
                                  ],
                                  "type": "string"
                                },
                                "path": {
                                  "maxLength": 400,
                                  "type": "string"
                                },
                                "value": {}
                              },
                              "required": [
                                "field",
                                "op"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "direction": {
                                  "default": "outgoing",
                                  "enum": [
                                    "outgoing",
                                    "incoming"
                                  ],
                                  "type": "string"
                                },
                                "relationship": {
                                  "type": "string"
                                },
                                "where": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "all": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "all"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "relationship",
                                "where"
                              ],
                              "type": "object"
                            }
                          ]
                        },
                        "maxItems": 20,
                        "type": "array"
                      }
                    },
                    "required": [
                      "all"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "object",
                  "query"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records search",
        "tags": [
          "query_search"
        ],
        "x-agentdb-category": "query_search",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/search/config": {
      "get": {
        "operationId": "search.config",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "search config",
        "tags": [
          "query_search"
        ],
        "x-agentdb-category": "query_search",
        "x-agentdb-scope": "schema:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/search/configure": {
      "post": {
        "operationId": "search.configure",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "fields": {
                    "items": {
                      "pattern": "^[a-z][a-z0-9_]{0,62}$",
                      "type": "string"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  },
                  "object": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  }
                },
                "required": [
                  "object"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "search configure",
        "tags": [
          "query_search"
        ],
        "x-agentdb-category": "query_search",
        "x-agentdb-scope": "schema:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/search/semantic": {
      "post": {
        "operationId": "records.search_semantic",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "include_archived": {
                    "type": "boolean"
                  },
                  "limit": {
                    "default": 10,
                    "maximum": 50,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "object": {
                    "type": "string"
                  },
                  "query": {
                    "maxLength": 1000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "where": {
                    "additionalProperties": false,
                    "properties": {
                      "all": {
                        "items": {
                          "anyOf": [
                            {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "type": "string"
                                },
                                "op": {
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "in",
                                    "lt",
                                    "lte",
                                    "gt",
                                    "gte",
                                    "is_null",
                                    "is_not_null",
                                    "contains",
                                    "starts_with",
                                    "has_any",
                                    "has_all",
                                    "within_bbox",
                                    "near",
                                    "has"
                                  ],
                                  "type": "string"
                                },
                                "path": {
                                  "maxLength": 400,
                                  "type": "string"
                                },
                                "value": {}
                              },
                              "required": [
                                "field",
                                "op"
                              ],
                              "type": "object"
                            },
                            {
                              "additionalProperties": false,
                              "properties": {
                                "direction": {
                                  "default": "outgoing",
                                  "enum": [
                                    "outgoing",
                                    "incoming"
                                  ],
                                  "type": "string"
                                },
                                "relationship": {
                                  "type": "string"
                                },
                                "where": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "all": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "op": {
                                            "enum": [
                                              "eq",
                                              "neq",
                                              "in",
                                              "lt",
                                              "lte",
                                              "gt",
                                              "gte",
                                              "is_null",
                                              "is_not_null",
                                              "contains",
                                              "starts_with",
                                              "has_any",
                                              "has_all",
                                              "within_bbox",
                                              "near",
                                              "has"
                                            ],
                                            "type": "string"
                                          },
                                          "path": {
                                            "maxLength": 400,
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "field",
                                          "op"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 20,
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "all"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "relationship",
                                "where"
                              ],
                              "type": "object"
                            }
                          ]
                        },
                        "maxItems": 20,
                        "type": "array"
                      }
                    },
                    "required": [
                      "all"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "object",
                  "query"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "records search semantic",
        "tags": [
          "query_search"
        ],
        "x-agentdb-category": "query_search",
        "x-agentdb-scope": "records:read",
        "x-stability": "experimental"
      }
    },
    "/v1/workspaces/{ws}/views": {
      "get": {
        "operationId": "views.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "object",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "views list",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "views.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "definition": {
                    "additionalProperties": false,
                    "properties": {
                      "display": {
                        "additionalProperties": false,
                        "properties": {
                          "calendar_events": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "items": {
                                  "maxLength": 64,
                                  "type": "string"
                                },
                                "maxItems": 20,
                                "minItems": 1,
                                "type": "array"
                              }
                            ]
                          },
                          "columns": {
                            "items": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "maxItems": 200,
                            "type": "array"
                          },
                          "date_field": {
                            "maxLength": 200,
                            "type": "string"
                          },
                          "end_field": {
                            "maxLength": 200,
                            "type": "string"
                          },
                          "fields": {
                            "items": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "maxItems": 50,
                            "type": "array"
                          },
                          "group_by": {
                            "maxLength": 200,
                            "type": "string"
                          },
                          "hidden_fields": {
                            "items": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "maxItems": 50,
                            "type": "array"
                          },
                          "report": {
                            "additionalProperties": false,
                            "properties": {
                              "chart": {
                                "default": "bar",
                                "enum": [
                                  "bar",
                                  "table"
                                ],
                                "type": "string"
                              },
                              "group_by": {
                                "default": [],
                                "items": {
                                  "anyOf": [
                                    {
                                      "maxLength": 200,
                                      "type": "string"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "bucket": {
                                          "enum": [
                                            "hour",
                                            "day",
                                            "week",
                                            "month",
                                            "year"
                                          ],
                                          "type": "string"
                                        },
                                        "field": {
                                          "maxLength": 200,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "field",
                                        "bucket"
                                      ],
                                      "type": "object"
                                    }
                                  ]
                                },
                                "maxItems": 2,
                                "type": "array"
                              },
                              "metrics": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "field": {
                                      "maxLength": 200,
                                      "type": "string"
                                    },
                                    "op": {
                                      "enum": [
                                        "count",
                                        "sum",
                                        "avg",
                                        "min",
                                        "max"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "op"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 4,
                                "minItems": 1,
                                "type": "array"
                              }
                            },
                            "required": [
                              "metrics"
                            ],
                            "type": "object"
                          },
                          "title_field": {
                            "maxLength": 200,
                            "type": "string"
                          },
                          "type": {
                            "default": "table",
                            "enum": [
                              "table",
                              "list",
                              "kanban",
                              "calendar",
                              "timeline",
                              "report"
                            ],
                            "type": "string"
                          },
                          "wip_enforce": {
                            "type": "boolean"
                          },
                          "wip_limits": {
                            "additionalProperties": {
                              "maximum": 10000,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "propertyNames": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "fields": {
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 200,
                        "minItems": 1,
                        "type": "array"
                      },
                      "include_archived": {
                        "type": "boolean"
                      },
                      "limit": {
                        "maximum": 200,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "rollups": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "as": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "direction": {
                              "default": "outgoing",
                              "enum": [
                                "outgoing",
                                "incoming"
                              ],
                              "type": "string"
                            },
                            "field": {
                              "type": "string"
                            },
                            "op": {
                              "enum": [
                                "count",
                                "sum",
                                "avg",
                                "min",
                                "max"
                              ],
                              "type": "string"
                            },
                            "relationship": {
                              "type": "string"
                            },
                            "where": {
                              "additionalProperties": false,
                              "properties": {
                                "all": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "field": {
                                        "type": "string"
                                      },
                                      "op": {
                                        "enum": [
                                          "eq",
                                          "neq",
                                          "in",
                                          "lt",
                                          "lte",
                                          "gt",
                                          "gte",
                                          "is_null",
                                          "is_not_null",
                                          "contains",
                                          "starts_with",
                                          "has_any",
                                          "has_all",
                                          "within_bbox",
                                          "near",
                                          "has"
                                        ],
                                        "type": "string"
                                      },
                                      "path": {
                                        "maxLength": 400,
                                        "type": "string"
                                      },
                                      "value": {}
                                    },
                                    "required": [
                                      "field",
                                      "op"
                                    ],
                                    "type": "object"
                                  },
                                  "maxItems": 20,
                                  "type": "array"
                                }
                              },
                              "required": [
                                "all"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "as",
                            "relationship",
                            "op"
                          ],
                          "type": "object"
                        },
                        "maxItems": 5,
                        "type": "array"
                      },
                      "sort": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "type": "string"
                            },
                            "order": {
                              "default": "asc",
                              "enum": [
                                "asc",
                                "desc"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "field"
                          ],
                          "type": "object"
                        },
                        "maxItems": 1,
                        "type": "array"
                      },
                      "where": {
                        "additionalProperties": false,
                        "properties": {
                          "all": {
                            "items": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "field": {
                                      "type": "string"
                                    },
                                    "op": {
                                      "enum": [
                                        "eq",
                                        "neq",
                                        "in",
                                        "lt",
                                        "lte",
                                        "gt",
                                        "gte",
                                        "is_null",
                                        "is_not_null",
                                        "contains",
                                        "starts_with",
                                        "has_any",
                                        "has_all",
                                        "within_bbox",
                                        "near",
                                        "has"
                                      ],
                                      "type": "string"
                                    },
                                    "path": {
                                      "maxLength": 400,
                                      "type": "string"
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "field",
                                    "op"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "direction": {
                                      "default": "outgoing",
                                      "enum": [
                                        "outgoing",
                                        "incoming"
                                      ],
                                      "type": "string"
                                    },
                                    "relationship": {
                                      "type": "string"
                                    },
                                    "where": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "all": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "field": {
                                                "type": "string"
                                              },
                                              "op": {
                                                "enum": [
                                                  "eq",
                                                  "neq",
                                                  "in",
                                                  "lt",
                                                  "lte",
                                                  "gt",
                                                  "gte",
                                                  "is_null",
                                                  "is_not_null",
                                                  "contains",
                                                  "starts_with",
                                                  "has_any",
                                                  "has_all",
                                                  "within_bbox",
                                                  "near",
                                                  "has"
                                                ],
                                                "type": "string"
                                              },
                                              "path": {
                                                "maxLength": 400,
                                                "type": "string"
                                              },
                                              "value": {}
                                            },
                                            "required": [
                                              "field",
                                              "op"
                                            ],
                                            "type": "object"
                                          },
                                          "maxItems": 20,
                                          "type": "array"
                                        }
                                      },
                                      "required": [
                                        "all"
                                      ],
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "relationship",
                                    "where"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "maxItems": 20,
                            "type": "array"
                          }
                        },
                        "required": [
                          "all"
                        ],
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "description": {
                    "maxLength": 1000,
                    "type": "string"
                  },
                  "name": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "object": {
                    "type": "string"
                  },
                  "visibility": {
                    "default": "private",
                    "enum": [
                      "private",
                      "workspace"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "object",
                  "definition"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "views create",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/views/{view}": {
      "delete": {
        "operationId": "views.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "view",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "views delete",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "views.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "view",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "views get",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "views.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "view",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "definition": {
                    "additionalProperties": false,
                    "properties": {
                      "display": {
                        "additionalProperties": false,
                        "properties": {
                          "calendar_events": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "items": {
                                  "maxLength": 64,
                                  "type": "string"
                                },
                                "maxItems": 20,
                                "minItems": 1,
                                "type": "array"
                              }
                            ]
                          },
                          "columns": {
                            "items": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "maxItems": 200,
                            "type": "array"
                          },
                          "date_field": {
                            "maxLength": 200,
                            "type": "string"
                          },
                          "end_field": {
                            "maxLength": 200,
                            "type": "string"
                          },
                          "fields": {
                            "items": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "maxItems": 50,
                            "type": "array"
                          },
                          "group_by": {
                            "maxLength": 200,
                            "type": "string"
                          },
                          "hidden_fields": {
                            "items": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "maxItems": 50,
                            "type": "array"
                          },
                          "report": {
                            "additionalProperties": false,
                            "properties": {
                              "chart": {
                                "default": "bar",
                                "enum": [
                                  "bar",
                                  "table"
                                ],
                                "type": "string"
                              },
                              "group_by": {
                                "default": [],
                                "items": {
                                  "anyOf": [
                                    {
                                      "maxLength": 200,
                                      "type": "string"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "bucket": {
                                          "enum": [
                                            "hour",
                                            "day",
                                            "week",
                                            "month",
                                            "year"
                                          ],
                                          "type": "string"
                                        },
                                        "field": {
                                          "maxLength": 200,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "field",
                                        "bucket"
                                      ],
                                      "type": "object"
                                    }
                                  ]
                                },
                                "maxItems": 2,
                                "type": "array"
                              },
                              "metrics": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "field": {
                                      "maxLength": 200,
                                      "type": "string"
                                    },
                                    "op": {
                                      "enum": [
                                        "count",
                                        "sum",
                                        "avg",
                                        "min",
                                        "max"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "op"
                                  ],
                                  "type": "object"
                                },
                                "maxItems": 4,
                                "minItems": 1,
                                "type": "array"
                              }
                            },
                            "required": [
                              "metrics"
                            ],
                            "type": "object"
                          },
                          "title_field": {
                            "maxLength": 200,
                            "type": "string"
                          },
                          "type": {
                            "default": "table",
                            "enum": [
                              "table",
                              "list",
                              "kanban",
                              "calendar",
                              "timeline",
                              "report"
                            ],
                            "type": "string"
                          },
                          "wip_enforce": {
                            "type": "boolean"
                          },
                          "wip_limits": {
                            "additionalProperties": {
                              "maximum": 10000,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "propertyNames": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "fields": {
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 200,
                        "minItems": 1,
                        "type": "array"
                      },
                      "include_archived": {
                        "type": "boolean"
                      },
                      "limit": {
                        "maximum": 200,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "rollups": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "as": {
                              "pattern": "^[a-z][a-z0-9_]{0,62}$",
                              "type": "string"
                            },
                            "direction": {
                              "default": "outgoing",
                              "enum": [
                                "outgoing",
                                "incoming"
                              ],
                              "type": "string"
                            },
                            "field": {
                              "type": "string"
                            },
                            "op": {
                              "enum": [
                                "count",
                                "sum",
                                "avg",
                                "min",
                                "max"
                              ],
                              "type": "string"
                            },
                            "relationship": {
                              "type": "string"
                            },
                            "where": {
                              "additionalProperties": false,
                              "properties": {
                                "all": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "field": {
                                        "type": "string"
                                      },
                                      "op": {
                                        "enum": [
                                          "eq",
                                          "neq",
                                          "in",
                                          "lt",
                                          "lte",
                                          "gt",
                                          "gte",
                                          "is_null",
                                          "is_not_null",
                                          "contains",
                                          "starts_with",
                                          "has_any",
                                          "has_all",
                                          "within_bbox",
                                          "near",
                                          "has"
                                        ],
                                        "type": "string"
                                      },
                                      "path": {
                                        "maxLength": 400,
                                        "type": "string"
                                      },
                                      "value": {}
                                    },
                                    "required": [
                                      "field",
                                      "op"
                                    ],
                                    "type": "object"
                                  },
                                  "maxItems": 20,
                                  "type": "array"
                                }
                              },
                              "required": [
                                "all"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "as",
                            "relationship",
                            "op"
                          ],
                          "type": "object"
                        },
                        "maxItems": 5,
                        "type": "array"
                      },
                      "sort": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "type": "string"
                            },
                            "order": {
                              "default": "asc",
                              "enum": [
                                "asc",
                                "desc"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "field"
                          ],
                          "type": "object"
                        },
                        "maxItems": 1,
                        "type": "array"
                      },
                      "where": {
                        "additionalProperties": false,
                        "properties": {
                          "all": {
                            "items": {
                              "anyOf": [
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "field": {
                                      "type": "string"
                                    },
                                    "op": {
                                      "enum": [
                                        "eq",
                                        "neq",
                                        "in",
                                        "lt",
                                        "lte",
                                        "gt",
                                        "gte",
                                        "is_null",
                                        "is_not_null",
                                        "contains",
                                        "starts_with",
                                        "has_any",
                                        "has_all",
                                        "within_bbox",
                                        "near",
                                        "has"
                                      ],
                                      "type": "string"
                                    },
                                    "path": {
                                      "maxLength": 400,
                                      "type": "string"
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "field",
                                    "op"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "direction": {
                                      "default": "outgoing",
                                      "enum": [
                                        "outgoing",
                                        "incoming"
                                      ],
                                      "type": "string"
                                    },
                                    "relationship": {
                                      "type": "string"
                                    },
                                    "where": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "all": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "field": {
                                                "type": "string"
                                              },
                                              "op": {
                                                "enum": [
                                                  "eq",
                                                  "neq",
                                                  "in",
                                                  "lt",
                                                  "lte",
                                                  "gt",
                                                  "gte",
                                                  "is_null",
                                                  "is_not_null",
                                                  "contains",
                                                  "starts_with",
                                                  "has_any",
                                                  "has_all",
                                                  "within_bbox",
                                                  "near",
                                                  "has"
                                                ],
                                                "type": "string"
                                              },
                                              "path": {
                                                "maxLength": 400,
                                                "type": "string"
                                              },
                                              "value": {}
                                            },
                                            "required": [
                                              "field",
                                              "op"
                                            ],
                                            "type": "object"
                                          },
                                          "maxItems": 20,
                                          "type": "array"
                                        }
                                      },
                                      "required": [
                                        "all"
                                      ],
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "relationship",
                                    "where"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "maxItems": 20,
                            "type": "array"
                          }
                        },
                        "required": [
                          "all"
                        ],
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "maxLength": 1000,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "pattern": "^[a-z][a-z0-9_]{0,62}$",
                    "type": "string"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  },
                  "visibility": {
                    "enum": [
                      "private",
                      "workspace"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "version"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "views update",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/views/{view}/publish": {
      "post": {
        "operationId": "views.publish",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "view",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "access": {
                    "enum": [
                      "link",
                      "password"
                    ],
                    "type": "string"
                  },
                  "allowed_origins": {
                    "items": {
                      "pattern": "^(https:\\/\\/[a-z0-9.-]+(:\\d+)?|http:\\/\\/(localhost|127\\.0\\.0\\.1)(:\\d+)?)$",
                      "type": "string"
                    },
                    "maxItems": 10,
                    "minItems": 1,
                    "type": "array"
                  },
                  "expires_at": {
                    "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                    "type": "string"
                  },
                  "expires_in_hours": {
                    "maximum": 8760,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "fields": {
                    "items": {
                      "maxLength": 200,
                      "type": "string"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  },
                  "password": {
                    "maxLength": 200,
                    "minLength": 10,
                    "type": "string"
                  },
                  "title": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Publish a saved view read-only through an expiring, revocable link",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/views/{view}/render": {
      "get": {
        "operationId": "views.render",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "view",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "A saved view rendered by its display config (docs/APP-VIEWS.md)",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/views/{view}/run": {
      "post": {
        "operationId": "views.run",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "view",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "cursor": {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  "limit": {
                    "maximum": 200,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "version": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "views run",
        "tags": [
          "views_dashboards"
        ],
        "x-agentdb-category": "views_dashboards",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/webhook-deliveries": {
      "get": {
        "operationId": "webhooks.deliveries",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "webhook_id",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "pending",
                "delivering",
                "succeeded",
                "dead",
                "cancelled"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maximum": 9007199254740991,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "webhooks deliveries",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/webhook-deliveries/{delivery}/redeliver": {
      "post": {
        "operationId": "webhooks.redeliver",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "delivery",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "webhooks redeliver",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/webhooks": {
      "get": {
        "operationId": "webhooks.list",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "webhooks list",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "post": {
        "operationId": "webhooks.create",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "events": {
                    "default": [],
                    "items": {
                      "enum": [
                        "record.created",
                        "record.updated",
                        "record.deleted",
                        "record.archived",
                        "record.unarchived",
                        "record.restored",
                        "record.purged",
                        "relationship.linked",
                        "relationship.unlinked",
                        "schema.changed",
                        "file.changed",
                        "webhook.disabled",
                        "message.posted",
                        "message.edited",
                        "message.deleted",
                        "channel.changed",
                        "inbox.item",
                        "conversation.changed",
                        "approval.submitted",
                        "approval.decided",
                        "approval.executed",
                        "approval.expired",
                        "calendar.reminder",
                        "connector.inbound",
                        "connector.sync_failed",
                        "*"
                      ],
                      "type": "string"
                    },
                    "maxItems": 26,
                    "type": "array"
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "objects": {
                    "items": {
                      "maxLength": 64,
                      "minLength": 1,
                      "type": "string"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  },
                  "url": {
                    "maxLength": 2048,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "webhooks create",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/webhooks/{webhook}": {
      "delete": {
        "operationId": "webhooks.delete",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "webhooks delete",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      },
      "get": {
        "operationId": "webhooks.get",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "webhooks get",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "webhooks.update",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "events": {
                    "items": {
                      "enum": [
                        "record.created",
                        "record.updated",
                        "record.deleted",
                        "record.archived",
                        "record.unarchived",
                        "record.restored",
                        "record.purged",
                        "relationship.linked",
                        "relationship.unlinked",
                        "schema.changed",
                        "file.changed",
                        "webhook.disabled",
                        "message.posted",
                        "message.edited",
                        "message.deleted",
                        "channel.changed",
                        "inbox.item",
                        "conversation.changed",
                        "approval.submitted",
                        "approval.decided",
                        "approval.executed",
                        "approval.expired",
                        "calendar.reminder",
                        "connector.inbound",
                        "connector.sync_failed",
                        "*"
                      ],
                      "type": "string"
                    },
                    "maxItems": 26,
                    "type": "array"
                  },
                  "name": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "objects": {
                    "anyOf": [
                      {
                        "items": {
                          "maxLength": 64,
                          "minLength": 1,
                          "type": "string"
                        },
                        "maxItems": 50,
                        "minItems": 1,
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "active",
                      "paused"
                    ],
                    "type": "string"
                  },
                  "url": {
                    "maxLength": 2048,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "webhooks update",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/webhooks/{webhook}/rotate-secret": {
      "post": {
        "operationId": "webhooks.rotate_secret",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "grace_seconds": {
                    "default": 86400,
                    "maximum": 604800,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "webhooks rotate secret",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/webhooks/{webhook}/test": {
      "post": {
        "operationId": "webhooks.test",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {},
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "webhooks test",
        "tags": [
          "automation"
        ],
        "x-agentdb-category": "automation",
        "x-agentdb-scope": "records:write",
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{ws}/workspace-imports": {
      "post": {
        "operationId": "workspace.import",
        "parameters": [
          {
            "in": "path",
            "name": "ws",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Retry key: the same key and request return the stored result (7 days).",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "additionalProperties": false,
                "properties": {
                  "dry_run": {
                    "default": false,
                    "type": "boolean"
                  },
                  "file_id": {
                    "type": "string"
                  },
                  "include_automations": {
                    "default": false,
                    "type": "boolean"
                  },
                  "name": {
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  },
                  "slug": {
                    "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
                    "type": "string"
                  }
                },
                "required": [
                  "file_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            },
            "description": "Success: {request_id, data}"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Error: {request_id, error: {code, message, retryable, details}}"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth": []
          }
        ],
        "summary": "Import a data-export bundle (a file of this workspace) into a NEW workspace of your account (dry_run first)",
        "tags": [
          "workspaces"
        ],
        "x-agentdb-category": "workspaces",
        "x-agentdb-scope": "records:read",
        "x-stability": "stable"
      }
    }
  },
  "servers": [
    {
      "url": "https://app.agentdb.link"
    }
  ],
  "tags": [
    {
      "description": "Find, create, select, rename, delete and restore workspaces (projects).",
      "name": "workspaces"
    },
    {
      "description": "Object types, typed fields, unique keys, indexes; history and undo.",
      "name": "schema"
    },
    {
      "description": "Create, read, update, upsert, delete, archive, restore and merge records.",
      "name": "records"
    },
    {
      "description": "Link and unlink records; list a record's links.",
      "name": "relationships"
    },
    {
      "description": "Exact queries (operators per field type), roll-ups, totals by date bucket, full-text search.",
      "name": "query_search"
    },
    {
      "description": "Upload, attach, download, version, search and share files.",
      "name": "files"
    },
    {
      "description": "Import CSV/JSON/JSONL files and export workspace data.",
      "name": "import_export"
    },
    {
      "description": "Saved views, rendered and published views, live dashboards.",
      "name": "views_dashboards"
    },
    {
      "description": "Webhooks, scheduled jobs (once/cron/RRULE) and trigger flows.",
      "name": "automation"
    },
    {
      "description": "Channels and messages, your inbox, shared conversations (handoff).",
      "name": "channels_inbox"
    },
    {
      "description": "Propose sensitive changes; a signed-in person decides in the AgentHub; approval policies.",
      "name": "approvals_hub"
    },
    {
      "description": "Calendars, events, availability, free slots, ICS import/export.",
      "name": "calendar"
    },
    {
      "description": "Knowledge items with citations, proposals, reviews and versions.",
      "name": "knowledge"
    },
    {
      "description": "Connectors to outside systems: sync, send, inbound events.",
      "name": "integrations"
    },
    {
      "description": "Install ready-made schemas and apps (CRM, todos, kanban, CMS, forms...).",
      "name": "packages_apps"
    },
    {
      "description": "CMS delivery and revisions, public forms, content dispatch.",
      "name": "publishing"
    },
    {
      "description": "Named agents and their keys, permissions, who may do what.",
      "name": "access"
    },
    {
      "description": "Retention and lifecycle settings, integrity checks.",
      "name": "administration"
    }
  ]
}
