{
  "openapi": "3.1.0",
  "info": {
    "title": "Telbox Agents API",
    "version": "2026-06-14",
    "description": "The **Telbox Agents** API \u2014 build cryptographically-verified agents that run as\nparticipants in end-to-end-encrypted conversations.\n\n* **Authentication** \u2014 every request carries a Bearer API key (`tb_live_\u2026`),\n  created in the developer console.\n* **Agents** \u2014 define an agent from a typed `AgentDefinitionIR` (or a curated\n  template), preview it with a side-effect-free dry-run, test-run it, and read\n  its run traces.\n* **MCP, both directions** \u2014 call the global MCP surface, or a published agent's\n  own OAuth-gated `/mcp` endpoint, from Claude Code / Cursor / Zed.\n\nDark in production until launch (the external surface is gated behind\n`apikey_auth_enabled`); enabled in the developer preview.\n",
    "contact": {
      "name": "Telbox Developers",
      "url": "https://developers.telbox.ai"
    }
  },
  "paths": {
    "/v1/agent-templates": {
      "get": {
        "summary": "Get Templates",
        "operationId": "get_templates_v1_agent_templates_get",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateView"
                  },
                  "title": "Response Get Templates V1 Agent Templates Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agent-tools": {
      "get": {
        "summary": "Agent Tools",
        "description": "The live tool registry as a catalog for the visual builder + SDK pages.\n\nPowers the Studio node palette (so it can never offer a tool the runtime\nlacks) and the SDK reference. Derived from ``TOOL_REGISTRY`` at call time.",
        "operationId": "agent_tools_v1_agent_tools_get",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolCatalog"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/api-keys": {
      "post": {
        "summary": "Issue Api Key",
        "description": "Mint a scoped developer API key for the caller's own workspace.\n\nThe self-serve front door the portal's \"Get an API key\" calls. The raw key is\nreturned exactly once. (External callers can authenticate with it once the\n``apikey_auth_enabled`` flag is flipped at launch.)",
        "operationId": "issue_api_key_v1_agents_api_keys_post",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyIssued"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents": {
      "get": {
        "summary": "List Agents",
        "operationId": "list_agents_v1_agents_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentSummary"
                  },
                  "title": "Response List Agents V1 Agents Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Agent",
        "operationId": "create_agent_v1_agents_post",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDefinitionIR"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/from-template": {
      "post": {
        "summary": "Install From Template",
        "operationId": "install_from_template_v1_agents_from_template_post",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstallTemplateBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/compile": {
      "post": {
        "summary": "Compile Agent",
        "description": "Draft an AgentDefinitionIR from natural language (no agent created).\n\nDelegates to the ``@build`` compiler (:mod:`telbox.modules.agent.nl_compiler`)\n\u2014 today deterministic keyword\u2192template matching personalized with your words.\nFree-form LLM generation graduates only once it clears the compiler eval gate\n(``telbox.modules.agent.eval.compiler_eval``).",
        "operationId": "compile_agent_v1_agents_compile_post",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompileBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompiledAgentView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/dry-run": {
      "post": {
        "summary": "Dry Run Ir",
        "description": "Preview what an agent built from this IR WOULD do \u2014 every step, each write's\nreal authority decision, whether it'd auto-reply \u2014 deterministically, with no\nLLM call and zero side effects. Use it to check a draft *before* creating it.",
        "operationId": "dry_run_ir_v1_agents_dry_run_post",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDefinitionIR"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/dry-run": {
      "post": {
        "summary": "Dry Run Agent",
        "description": "Preview what an installed agent WOULD do, from its persisted IR + guards.",
        "operationId": "dry_run_agent_v1_agents__agent_id__dry_run_post",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DryRunView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}": {
      "get": {
        "summary": "Get Agent",
        "operationId": "get_agent_v1_agents__agent_id__get",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Revoke Agent",
        "description": "Revoke: tombstone the definition, revoke all grants, disable all triggers.",
        "operationId": "revoke_agent_v1_agents__agent_id__delete",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/test-run": {
      "post": {
        "summary": "Test Run",
        "description": "Run the agent once against a sample prompt, persisting a durable AgentRun.\n\nReuses run_agent_phase2 (the EA's loop). Resilient: a failed run (e.g. no LLM\nconfigured) is recorded with its error rather than 500-ing \u2014 it shows up in\nthe run history either way.",
        "operationId": "test_run_v1_agents__agent_id__test_run_post",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestRunBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/runs": {
      "get": {
        "summary": "List Runs",
        "operationId": "list_runs_v1_agents__agent_id__runs_get",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RunSummary"
                  },
                  "title": "Response List Runs V1 Agents  Agent Id  Runs Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/runs/{run_id}": {
      "get": {
        "summary": "Get Run",
        "operationId": "get_run_v1_agents__agent_id__runs__run_id__get",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Run Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/scopes": {
      "get": {
        "summary": "Get Scopes",
        "operationId": "get_scopes_v1_developer_scopes_get",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopesView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/api-keys": {
      "get": {
        "summary": "List Keys",
        "operationId": "list_keys_v1_developer_api_keys_get",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyView"
                  },
                  "title": "Response List Keys V1 Developer Api Keys Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Key",
        "operationId": "create_key_v1_developer_api_keys_post",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyCreateBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/api-keys/{key_id}": {
      "delete": {
        "summary": "Revoke Key",
        "operationId": "revoke_key_v1_developer_api_keys__key_id__delete",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/api-keys/{key_id}/rotate": {
      "post": {
        "summary": "Rotate Key",
        "operationId": "rotate_key_v1_developer_api_keys__key_id__rotate_post",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/usage": {
      "get": {
        "summary": "Usage",
        "operationId": "usage_v1_developer_usage_get",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/webhook-events": {
      "get": {
        "summary": "Webhook Events",
        "operationId": "webhook_events_v1_developer_webhook_events_get",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventsView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/webhooks": {
      "get": {
        "summary": "List Webhooks",
        "operationId": "list_webhooks_v1_developer_webhooks_get",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookView"
                  },
                  "title": "Response List Webhooks V1 Developer Webhooks Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Webhook",
        "operationId": "create_webhook_v1_developer_webhooks_post",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/webhooks/{endpoint_id}": {
      "delete": {
        "summary": "Disable Webhook",
        "operationId": "disable_webhook_v1_developer_webhooks__endpoint_id__delete",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Endpoint Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/auth/register": {
      "post": {
        "summary": "Register",
        "operationId": "register_v1_developer_auth_register_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthOutput"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/auth/verify": {
      "post": {
        "summary": "Verify",
        "operationId": "verify_v1_developer_auth_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthOutput"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/auth/login": {
      "post": {
        "summary": "Login",
        "operationId": "login_v1_developer_auth_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthOutput"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/developer/auth/resend": {
      "post": {
        "summary": "Resend",
        "operationId": "resend_v1_developer_auth_resend_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthOutput"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/mcp": {
      "post": {
        "summary": "Agent Mcp Endpoint",
        "description": "The agent's own OAuth-gated MCP endpoint (JSON-RPC over Streamable HTTP).",
        "operationId": "agent_mcp_endpoint_v1_agents__agent_id__mcp_post",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/mcp-connections": {
      "get": {
        "summary": "List Connections",
        "operationId": "list_connections_v1_agents__agent_id__mcp_connections_get",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionView"
                  },
                  "title": "Response List Connections V1 Agents  Agent Id  Mcp Connections Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Register Connection",
        "operationId": "register_connection_v1_agents__agent_id__mcp_connections_post",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterConnectionBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/mcp-connections/{connection_id}": {
      "delete": {
        "summary": "Revoke Connection",
        "operationId": "revoke_connection_v1_agents__agent_id__mcp_connections__connection_id__delete",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Connection Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agents/{agent_id}/mcp-connections/{connection_id}/call": {
      "post": {
        "summary": "Call Connection Tool",
        "description": "Forward one tool call to the external MCP server, fully guarded.\n\nFirst-party owner-driven. Authorisation against the scope map uses the\ncaller's scopes (None for a first-party JWT caller \u21d2 unrestricted, but the\nconnection's scope map still gates which tools are *callable at all*).",
        "operationId": "call_connection_tool_v1_agents__agent_id__mcp_connections__connection_id__call_post",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Agent Id"
            }
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Connection Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallToolBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Call Connection Tool V1 Agents  Agent Id  Mcp Connections  Connection Id  Call Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "summary": "Me",
        "operationId": "me_v1_me_get",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update Me",
        "description": "Update the caller's profile. Currently `display_name`,\n`preferred_language`, and morning_brief subscription are accepted;\neach may be omitted to leave that field alone.",
        "operationId": "update_me_v1_me_patch",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateMeResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/connected_apps": {
      "get": {
        "summary": "List Connected Apps",
        "description": "List the OAuth clients the caller has granted access to.\n\nReturns one row per distinct ``oauth_client_id`` from ``api_keys``\nthat the caller created (``created_by_user_id = caller.user_id``)\nand that has not been revoked. Multiple api_keys for the same\nclient collapse to the most-recently-used row via\n``DISTINCT ON (client_id) ... ORDER BY client_id, last_used_at DESC\nNULLS LAST``.\n\nEmpty list when the user has no connected apps yet. No 404 \u2014 an\nempty list is the natural \"nothing here\" shape for iOS.",
        "operationId": "list_connected_apps_v1_me_connected_apps_get",
        "parameters": [
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectedAppView"
                  },
                  "title": "Response List Connected Apps V1 Me Connected Apps Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/connected_apps/{client_id}": {
      "delete": {
        "summary": "Revoke Connected App",
        "description": "Revoke every active api_key the caller has issued to one OAuth\nclient.\n\nIdempotent: revoking a client that has no active keys (or no keys\nat all) returns 204 without touching any rows. We deliberately\ndon't 404 on \"nothing to revoke\" \u2014 the user's mental model is\n\"this app is gone\", not \"there were N keys, all gone\"; surfacing\na 404 here would just race with a parallel iOS refresh that\nalready removed the row.\n\nAudit: every call appends an ``oauth.client.user_revoked`` row to\n``platform_audit`` with ``{client_id, user_id, key_count}`` \u2014\n``key_count`` counts the rows we actually flipped (i.e. were\nactive before the call), so the chain captures only meaningful\nstate changes.",
        "operationId": "revoke_connected_app_v1_me_connected_apps__client_id__delete",
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Client Id"
            }
          },
          {
            "name": "access_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Access Token"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          },
          {
            "name": "x-workspace-id",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AIFeatureQuotaView": {
        "properties": {
          "remaining": {
            "type": "number",
            "title": "Remaining"
          },
          "capacity": {
            "type": "number",
            "title": "Capacity"
          },
          "monthly_allowance": {
            "type": "integer",
            "title": "Monthly Allowance"
          }
        },
        "type": "object",
        "required": [
          "remaining",
          "capacity",
          "monthly_allowance"
        ],
        "title": "AIFeatureQuotaView",
        "description": "One-feature snapshot of the free-tier monthly quota.\n\nEmitted on /v1/me only for users on ``subscription_tier='free'``;\npaid tiers receive ``ai_feature_quotas=None``. iOS uses ``remaining``\nto render the quota meter and decide when to surface the\n\"running low \u2014 upgrade to Plus\" copy.\n\nThe bucket is a continuous token bucket internally, so ``remaining``\nis a float that recovers between calls. ``monthly_allowance`` is the\nsustained per-month refill rate \u00d7 2.592e6 seconds \u2014 the long-run\ncap a user can use per month. ``capacity`` is the upfront burst the\nbucket allows after a quiet period (catch-up after travel etc.)."
      },
      "AIProcessorInfo": {
        "properties": {
          "device_id": {
            "type": "string",
            "format": "uuid",
            "title": "Device Id"
          },
          "encryption_public_key_b64": {
            "type": "string",
            "title": "Encryption Public Key B64"
          },
          "identity_public_key_b64": {
            "type": "string",
            "title": "Identity Public Key B64"
          }
        },
        "type": "object",
        "required": [
          "device_id",
          "encryption_public_key_b64",
          "identity_public_key_b64"
        ],
        "title": "AIProcessorInfo",
        "description": "Public-only material for the workspace's AI processor.\n\nClients use this to include the AI processor as a recipient when sealing\nenvelopes for Tier 1 workspaces. The encryption_public_key_b64 is the\nX25519 pubkey the wrapped session key gets encrypted to."
      },
      "AgentDefinitionIR": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "title": "Schema Version",
            "default": 1
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "persona": {
            "type": "string",
            "title": "Persona",
            "default": ""
          },
          "triggers": {
            "items": {
              "$ref": "#/components/schemas/TriggerSpec"
            },
            "type": "array",
            "title": "Triggers"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/StepSpec"
            },
            "type": "array",
            "title": "Steps"
          },
          "guards": {
            "$ref": "#/components/schemas/GuardSpec"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "steps"
        ],
        "title": "AgentDefinitionIR"
      },
      "AgentDetail": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "visibility": {
            "type": "string",
            "title": "Visibility"
          },
          "revoked": {
            "type": "boolean",
            "title": "Revoked"
          },
          "identity_fingerprint": {
            "type": "string",
            "title": "Identity Fingerprint"
          },
          "version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "tools": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tools"
          },
          "triggers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Triggers"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "persona": {
            "type": "string",
            "title": "Persona"
          },
          "ir": {
            "additionalProperties": true,
            "type": "object",
            "title": "Ir"
          },
          "permissions": {
            "additionalProperties": true,
            "type": "object",
            "title": "Permissions"
          },
          "consented": {
            "type": "boolean",
            "title": "Consented"
          }
        },
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "visibility",
          "revoked",
          "identity_fingerprint",
          "version",
          "tools",
          "triggers",
          "created_at",
          "persona",
          "ir",
          "permissions",
          "consented"
        ],
        "title": "AgentDetail"
      },
      "AgentSummary": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "visibility": {
            "type": "string",
            "title": "Visibility"
          },
          "revoked": {
            "type": "boolean",
            "title": "Revoked"
          },
          "identity_fingerprint": {
            "type": "string",
            "title": "Identity Fingerprint"
          },
          "version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "tools": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tools"
          },
          "triggers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Triggers"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "slug",
          "name",
          "visibility",
          "revoked",
          "identity_fingerprint",
          "version",
          "tools",
          "triggers",
          "created_at"
        ],
        "title": "AgentSummary"
      },
      "ApiKeyIssued": {
        "properties": {
          "raw_key": {
            "type": "string",
            "title": "Raw Key"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes"
          },
          "env": {
            "type": "string",
            "title": "Env"
          }
        },
        "type": "object",
        "required": [
          "raw_key",
          "prefix",
          "name",
          "scopes",
          "env"
        ],
        "title": "ApiKeyIssued",
        "description": "Returned ONCE \u2014 the raw key the developer must stash now."
      },
      "ArgBinding": {
        "properties": {
          "literal": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Literal"
          },
          "from_trigger": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Trigger"
          },
          "from_step": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Step"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ArgBinding",
        "description": "How one tool argument is filled \u2014 exactly one source."
      },
      "AuthOutput": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "access_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access Token"
          },
          "needs_verification": {
            "type": "boolean",
            "title": "Needs Verification",
            "default": false
          },
          "dev_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dev Code"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "AuthOutput"
      },
      "BadgeResponse": {
        "properties": {
          "total_unread": {
            "type": "integer",
            "title": "Total Unread"
          }
        },
        "type": "object",
        "required": [
          "total_unread"
        ],
        "title": "BadgeResponse",
        "description": "Total unread peer messages across every thread the caller belongs\nto. Used by iOS to set the app icon badge in one round-trip \u2014 no\nper-thread enumeration required."
      },
      "CallToolBody": {
        "properties": {
          "tool": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Tool"
          },
          "arguments": {
            "additionalProperties": true,
            "type": "object",
            "title": "Arguments"
          }
        },
        "type": "object",
        "required": [
          "tool"
        ],
        "title": "CallToolBody"
      },
      "CapabilityGuard": {
        "properties": {
          "level": {
            "type": "string",
            "title": "Level"
          },
          "limits": {
            "additionalProperties": true,
            "type": "object",
            "title": "Limits"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "level"
        ],
        "title": "CapabilityGuard"
      },
      "CompileBody": {
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 3,
            "title": "Text"
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "CompileBody"
      },
      "CompiledAgentView": {
        "properties": {
          "ir": {
            "additionalProperties": true,
            "type": "object",
            "title": "Ir"
          },
          "source": {
            "type": "string",
            "title": "Source"
          },
          "matched_template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Matched Template"
          },
          "rendered_steps": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Rendered Steps"
          }
        },
        "type": "object",
        "required": [
          "ir",
          "source",
          "matched_template",
          "rendered_steps"
        ],
        "title": "CompiledAgentView"
      },
      "ConnectedAppView": {
        "properties": {
          "client_id": {
            "type": "string",
            "format": "uuid",
            "title": "Client Id"
          },
          "client_name": {
            "type": "string",
            "title": "Client Name"
          },
          "logo_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Uri"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes"
          },
          "granted_at": {
            "type": "string",
            "format": "date-time",
            "title": "Granted At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          }
        },
        "type": "object",
        "required": [
          "client_id",
          "client_name",
          "scopes",
          "granted_at"
        ],
        "title": "ConnectedAppView",
        "description": "One OAuth client the caller has granted access to.\n\nSourced from a JOIN of ``api_keys`` (the access-token rows minted\nby the OAuth ``/token`` endpoint) onto ``oauth_clients`` (the\nRFC 7591 registration metadata). ``client_id`` is the OAuth wire\nidentifier shared with the third-party app; iOS uses it as the\npath parameter for the revoke endpoint."
      },
      "ConnectionView": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "agent_id": {
            "type": "string",
            "title": "Agent Id"
          },
          "namespace": {
            "type": "string",
            "title": "Namespace"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "auth_scheme": {
            "type": "string",
            "title": "Auth Scheme"
          },
          "has_auth": {
            "type": "boolean",
            "title": "Has Auth"
          },
          "exposed_tools": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Exposed Tools"
          },
          "scope_map": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Scope Map"
          },
          "no_train": {
            "type": "boolean",
            "title": "No Train"
          },
          "training_consented": {
            "type": "boolean",
            "title": "Training Consented"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "agent_id",
          "namespace",
          "display_name",
          "url",
          "auth_scheme",
          "has_auth",
          "exposed_tools",
          "scope_map",
          "no_train",
          "training_consented",
          "enabled",
          "status",
          "last_used_at",
          "revoked_at",
          "created_at"
        ],
        "title": "ConnectionView"
      },
      "ConsentRequest": {
        "properties": {
          "transport_e2e_acknowledged": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transport E2E Acknowledged"
          },
          "ai_processing": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Processing"
          },
          "ai_training_on_free_tier": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Training On Free Tier"
          }
        },
        "type": "object",
        "title": "ConsentRequest",
        "description": "Body for POST /v1/me/consent. All fields optional; only fields\npresent in the request are mutated. Each field is independently\ngrantable / revocable."
      },
      "ConsentResponse": {
        "properties": {
          "transport_e2e_acknowledged_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transport E2E Acknowledged At"
          },
          "ai_processing_consent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Processing Consent At"
          },
          "ai_training_consent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Training Consent At"
          },
          "subscription_tier": {
            "type": "string",
            "title": "Subscription Tier"
          }
        },
        "type": "object",
        "required": [
          "transport_e2e_acknowledged_at",
          "ai_processing_consent_at",
          "ai_training_consent_at",
          "subscription_tier"
        ],
        "title": "ConsentResponse"
      },
      "DeviceListResponse": {
        "properties": {
          "devices": {
            "items": {
              "$ref": "#/components/schemas/DeviceView"
            },
            "type": "array",
            "title": "Devices"
          }
        },
        "type": "object",
        "required": [
          "devices"
        ],
        "title": "DeviceListResponse"
      },
      "DeviceView": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "platform": {
            "type": "string",
            "title": "Platform"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "last_seen_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen At"
          },
          "is_current": {
            "type": "boolean",
            "title": "Is Current",
            "default": false
          },
          "encryption_public_key_fingerprint": {
            "type": "string",
            "title": "Encryption Public Key Fingerprint",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "id",
          "label",
          "platform"
        ],
        "title": "DeviceView"
      },
      "DryRunView": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "triggers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Triggers"
          },
          "steps": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Steps"
          },
          "effects": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Effects"
          },
          "would_auto_reply": {
            "type": "boolean",
            "title": "Would Auto Reply"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings"
          }
        },
        "type": "object",
        "required": [
          "name",
          "triggers",
          "steps",
          "effects",
          "would_auto_reply",
          "warnings"
        ],
        "title": "DryRunView",
        "description": "Deterministic preview of what an agent WOULD do \u2014 no LLM, no side effects."
      },
      "EventsView": {
        "properties": {
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Events"
          }
        },
        "type": "object",
        "required": [
          "events"
        ],
        "title": "EventsView"
      },
      "GuardSpec": {
        "properties": {
          "capabilities": {
            "additionalProperties": {
              "$ref": "#/components/schemas/CapabilityGuard"
            },
            "type": "object",
            "title": "Capabilities"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "GuardSpec"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InstallTemplateBody": {
        "properties": {
          "template_id": {
            "type": "string",
            "title": "Template Id"
          }
        },
        "type": "object",
        "required": [
          "template_id"
        ],
        "title": "InstallTemplateBody"
      },
      "KeyCreateBody": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Name"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "KeyCreateBody"
      },
      "KeyCreated": {
        "properties": {
          "key": {
            "$ref": "#/components/schemas/KeyView"
          },
          "raw_key": {
            "type": "string",
            "title": "Raw Key"
          },
          "env": {
            "type": "string",
            "title": "Env"
          }
        },
        "type": "object",
        "required": [
          "key",
          "raw_key",
          "env"
        ],
        "title": "KeyCreated",
        "description": "Returned ONCE \u2014 the raw key the developer must stash now."
      },
      "KeyView": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "revoked": {
            "type": "boolean",
            "title": "Revoked"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "prefix",
          "scopes",
          "created_at",
          "last_used_at",
          "expires_at",
          "revoked_at",
          "revoked"
        ],
        "title": "KeyView"
      },
      "LoginBody": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 320,
            "minLength": 3,
            "title": "Email"
          },
          "password": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "LoginBody"
      },
      "MeResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "status_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Text"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "workspaces": {
            "items": {
              "$ref": "#/components/schemas/WorkspaceView"
            },
            "type": "array",
            "title": "Workspaces"
          },
          "devices": {
            "items": {
              "$ref": "#/components/schemas/DeviceView"
            },
            "type": "array",
            "title": "Devices"
          },
          "avatar_object_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Object Key"
          },
          "preferred_language": {
            "type": "string",
            "title": "Preferred Language",
            "default": "en"
          },
          "transcription_language_pref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcription Language Pref"
          },
          "translation_scope": {
            "type": "string",
            "title": "Translation Scope",
            "default": "voice"
          },
          "subscription_tier": {
            "type": "string",
            "title": "Subscription Tier",
            "default": "free"
          },
          "ai_training_consent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Training Consent At"
          },
          "ai_processing_consent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Processing Consent At"
          },
          "transport_e2e_acknowledged_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transport E2E Acknowledged At"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Id"
          },
          "personal_workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personal Workspace Id"
          },
          "task_extraction_enabled": {
            "type": "boolean",
            "title": "Task Extraction Enabled",
            "default": true
          },
          "call_insights_enabled": {
            "type": "boolean",
            "title": "Call Insights Enabled",
            "default": true
          },
          "voice_note_display_mode": {
            "type": "string",
            "title": "Voice Note Display Mode",
            "default": "full_transcript"
          },
          "ai_feature_quotas": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/AIFeatureQuotaView"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Feature Quotas"
          },
          "echo_streak_days": {
            "type": "integer",
            "title": "Echo Streak Days",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "display_name",
          "email",
          "phone",
          "workspaces",
          "devices"
        ],
        "title": "MeResponse"
      },
      "PasskeyView": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "credential_id": {
            "type": "string",
            "title": "Credential Id"
          },
          "transports": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Transports"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "credential_id",
          "transports",
          "created_at",
          "last_used_at"
        ],
        "title": "PasskeyView",
        "description": "One registered passkey, as surfaced in the iOS/Android passkey manager."
      },
      "PrivacySettingsResponse": {
        "properties": {
          "who_can_message": {
            "type": "string",
            "title": "Who Can Message"
          },
          "who_can_call": {
            "type": "string",
            "title": "Who Can Call"
          },
          "last_seen_visibility": {
            "type": "string",
            "title": "Last Seen Visibility"
          },
          "who_can_add_to_groups": {
            "type": "string",
            "title": "Who Can Add To Groups"
          }
        },
        "type": "object",
        "required": [
          "who_can_message",
          "who_can_call",
          "last_seen_visibility",
          "who_can_add_to_groups"
        ],
        "title": "PrivacySettingsResponse",
        "description": "The caller's four granular privacy controls. Returned by GET + PUT."
      },
      "RegisterBody": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 320,
            "minLength": 3,
            "title": "Email"
          },
          "password": {
            "type": "string",
            "maxLength": 200,
            "minLength": 10,
            "title": "Password"
          },
          "display_name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Display Name"
          }
        },
        "type": "object",
        "required": [
          "email",
          "password",
          "display_name"
        ],
        "title": "RegisterBody"
      },
      "RegisterConnectionBody": {
        "properties": {
          "namespace": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Namespace"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "title": "Url"
          },
          "auth_token": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096
              },
              {
                "type": "null"
              }
            ],
            "title": "Auth Token"
          },
          "scope_map": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Scope Map"
          },
          "no_train": {
            "type": "boolean",
            "title": "No Train",
            "default": false
          },
          "training_consented": {
            "type": "boolean",
            "title": "Training Consented",
            "default": false
          },
          "exposed_tools": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exposed Tools"
          }
        },
        "type": "object",
        "required": [
          "namespace",
          "url"
        ],
        "title": "RegisterConnectionBody"
      },
      "ResendBody": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 320,
            "minLength": 3,
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "ResendBody"
      },
      "RevokeDeviceResponse": {
        "properties": {
          "revoked_device_id": {
            "type": "string",
            "format": "uuid",
            "title": "Revoked Device Id"
          }
        },
        "type": "object",
        "required": [
          "revoked_device_id"
        ],
        "title": "RevokeDeviceResponse"
      },
      "RunDetail": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "latency_ms": {
            "type": "integer",
            "title": "Latency Ms"
          },
          "model_used": {
            "type": "string",
            "title": "Model Used"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "trace": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Trace"
          },
          "answer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answer"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "prompt",
          "created_at",
          "completed_at",
          "latency_ms",
          "model_used",
          "error",
          "trace",
          "answer"
        ],
        "title": "RunDetail"
      },
      "RunSummary": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "latency_ms": {
            "type": "integer",
            "title": "Latency Ms"
          },
          "model_used": {
            "type": "string",
            "title": "Model Used"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "prompt",
          "created_at",
          "completed_at",
          "latency_ms",
          "model_used",
          "error"
        ],
        "title": "RunSummary"
      },
      "ScopesView": {
        "properties": {
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes"
          }
        },
        "type": "object",
        "required": [
          "scopes"
        ],
        "title": "ScopesView"
      },
      "SignOutAllResponse": {
        "properties": {
          "revoked_device_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Revoked Device Ids"
          }
        },
        "type": "object",
        "required": [
          "revoked_device_ids"
        ],
        "title": "SignOutAllResponse"
      },
      "StepSpec": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "enum": [
              "tool",
              "if",
              "say"
            ],
            "title": "Type"
          },
          "tool": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool"
          },
          "args": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ArgBinding"
            },
            "type": "object",
            "title": "Args"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "condition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition"
          },
          "on_true": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "On True"
          },
          "on_false": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "On False"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "type"
        ],
        "title": "StepSpec"
      },
      "TemplateView": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "category": {
            "type": "string",
            "title": "Category"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "description",
          "category"
        ],
        "title": "TemplateView"
      },
      "TestRunBody": {
        "properties": {
          "prompt": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Prompt"
          }
        },
        "type": "object",
        "required": [
          "prompt"
        ],
        "title": "TestRunBody"
      },
      "ToolArgView": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "required": {
            "type": "boolean",
            "title": "Required"
          }
        },
        "type": "object",
        "required": [
          "name",
          "required"
        ],
        "title": "ToolArgView"
      },
      "ToolCatalog": {
        "properties": {
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ToolView"
            },
            "type": "array",
            "title": "Tools"
          },
          "trigger_kinds": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Trigger Kinds"
          },
          "authority_levels": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Authority Levels"
          }
        },
        "type": "object",
        "required": [
          "tools",
          "trigger_kinds",
          "authority_levels"
        ],
        "title": "ToolCatalog"
      },
      "ToolView": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "side_effects": {
            "type": "string",
            "title": "Side Effects"
          },
          "category": {
            "type": "string",
            "title": "Category"
          },
          "capability": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Capability"
          },
          "args": {
            "items": {
              "$ref": "#/components/schemas/ToolArgView"
            },
            "type": "array",
            "title": "Args"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "side_effects",
          "category",
          "capability",
          "args"
        ],
        "title": "ToolView"
      },
      "TriggerSpec": {
        "properties": {
          "kind": {
            "type": "string",
            "title": "Kind"
          },
          "filter": {
            "additionalProperties": true,
            "type": "object",
            "title": "Filter"
          },
          "cron": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cron"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "kind"
        ],
        "title": "TriggerSpec"
      },
      "UpdateMeRequest": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "status_text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 140
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Text"
          },
          "preferred_language": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8,
                "minLength": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Language"
          },
          "morning_brief_minutes": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1439.0,
                "minimum": -1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Morning Brief Minutes"
          },
          "morning_brief_tz": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Morning Brief Tz"
          },
          "transcription_language_pref": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 32
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcription Language Pref"
          },
          "translation_scope": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 16
              },
              {
                "type": "null"
              }
            ],
            "title": "Translation Scope"
          },
          "selected_voice_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Selected Voice Id"
          },
          "task_extraction_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Extraction Enabled"
          },
          "call_insights_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Call Insights Enabled"
          },
          "voice_note_display_mode": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 16
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Note Display Mode"
          }
        },
        "type": "object",
        "title": "UpdateMeRequest",
        "description": "Subset of profile fields the user is allowed to edit themselves.\nEmail/phone changes flow through different paths (re-verify) so\nthey don't end up here. `display_name` and `preferred_language` are\nfully self-serve; `avatar_object_key` is set by the avatar-upload\nendpoint (POST /v1/me/avatar) and isn't accepted here."
      },
      "UpdateMeResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "status_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Text"
          },
          "preferred_language": {
            "type": "string",
            "title": "Preferred Language"
          },
          "transcription_language_pref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcription Language Pref"
          },
          "translation_scope": {
            "type": "string",
            "title": "Translation Scope",
            "default": "voice"
          },
          "task_extraction_enabled": {
            "type": "boolean",
            "title": "Task Extraction Enabled",
            "default": true
          },
          "call_insights_enabled": {
            "type": "boolean",
            "title": "Call Insights Enabled",
            "default": true
          },
          "voice_note_display_mode": {
            "type": "string",
            "title": "Voice Note Display Mode",
            "default": "full_transcript"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "display_name",
          "preferred_language"
        ],
        "title": "UpdateMeResponse"
      },
      "UpdatePrivacySettingsRequest": {
        "properties": {
          "who_can_message": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(everyone|contacts|nobody)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Who Can Message"
          },
          "who_can_call": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(everyone|contacts|nobody)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Who Can Call"
          },
          "last_seen_visibility": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(everyone|contacts|nobody)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen Visibility"
          },
          "who_can_add_to_groups": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(everyone|contacts|nobody)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Who Can Add To Groups"
          }
        },
        "type": "object",
        "title": "UpdatePrivacySettingsRequest",
        "description": "Partial patch for PUT /v1/me/privacy. All fields optional \u2014 only fields\npresent in the request are mutated; omitting a field leaves it unchanged.\nEach accepts one of ``everyone`` / ``contacts`` / ``nobody``."
      },
      "UsageView": {
        "properties": {
          "agents": {
            "type": "integer",
            "title": "Agents"
          },
          "active_keys": {
            "type": "integer",
            "title": "Active Keys"
          },
          "total_runs": {
            "type": "integer",
            "title": "Total Runs"
          },
          "completed": {
            "type": "integer",
            "title": "Completed"
          },
          "failed": {
            "type": "integer",
            "title": "Failed"
          },
          "success_rate": {
            "type": "number",
            "title": "Success Rate"
          },
          "avg_latency_ms": {
            "type": "integer",
            "title": "Avg Latency Ms"
          },
          "p95_latency_ms": {
            "type": "integer",
            "title": "P95 Latency Ms"
          },
          "runs_30d": {
            "type": "integer",
            "title": "Runs 30D"
          }
        },
        "type": "object",
        "required": [
          "agents",
          "active_keys",
          "total_runs",
          "completed",
          "failed",
          "success_rate",
          "avg_latency_ms",
          "p95_latency_ms",
          "runs_30d"
        ],
        "title": "UsageView"
      },
      "UserIdentityRequest": {
        "properties": {
          "user_identity_public_key_b64": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "User Identity Public Key B64"
          }
        },
        "type": "object",
        "required": [
          "user_identity_public_key_b64"
        ],
        "title": "UserIdentityRequest"
      },
      "UserIdentityResponse": {
        "properties": {
          "user_identity_public_key_b64": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Identity Public Key B64"
          },
          "rotated": {
            "type": "boolean",
            "title": "Rotated"
          }
        },
        "type": "object",
        "required": [
          "user_identity_public_key_b64",
          "rotated"
        ],
        "title": "UserIdentityResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VerifyBody": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 320,
            "minLength": 3,
            "title": "Email"
          },
          "code": {
            "type": "string",
            "maxLength": 6,
            "minLength": 6,
            "title": "Code"
          }
        },
        "type": "object",
        "required": [
          "email",
          "code"
        ],
        "title": "VerifyBody"
      },
      "WebhookCreateBody": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 8,
            "title": "Url"
          },
          "subscribed_events": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Subscribed Events"
          }
        },
        "type": "object",
        "required": [
          "url",
          "subscribed_events"
        ],
        "title": "WebhookCreateBody"
      },
      "WebhookCreated": {
        "properties": {
          "webhook": {
            "$ref": "#/components/schemas/WebhookView"
          },
          "secret": {
            "type": "string",
            "title": "Secret"
          }
        },
        "type": "object",
        "required": [
          "webhook",
          "secret"
        ],
        "title": "WebhookCreated",
        "description": "Returned ONCE \u2014 the HMAC signing secret is shown only here."
      },
      "WebhookView": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "subscribed_events": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Subscribed Events"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "disabled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled At"
          },
          "disabled": {
            "type": "boolean",
            "title": "Disabled"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "subscribed_events",
          "created_at",
          "disabled_at",
          "disabled"
        ],
        "title": "WebhookView"
      },
      "WorkspaceView": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "privacy_tier": {
            "type": "string",
            "title": "Privacy Tier"
          },
          "ai_processing_mode": {
            "type": "string",
            "title": "Ai Processing Mode"
          },
          "plan": {
            "type": "string",
            "title": "Plan"
          },
          "region": {
            "type": "string",
            "title": "Region"
          },
          "ai_processor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AIProcessorInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "echo_thread_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Echo Thread Id"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "privacy_tier",
          "ai_processing_mode",
          "plan",
          "region"
        ],
        "title": "WorkspaceView"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "tb_live_\u2026",
        "description": "A Telbox API key, created in the developer console."
      }
    }
  },
  "servers": [
    {
      "url": "https://api.telbox.ai",
      "description": "Production"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ]
}
