{
  "openapi": "3.1.0",
  "info": {
    "title": "SharpX Platform Backend",
    "version": "0.1.0",
    "description": "Phase 0 backend for hosted SharpX agent runs"
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Liveness probe",
        "operationId": "health_liveness_health_get",
        "tags": [
          "health"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/health/db": {
      "get": {
        "summary": "Database connectivity probe",
        "operationId": "health_db_health_db_get",
        "tags": [
          "health"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/signup": {
      "post": {
        "summary": "Create an account",
        "operationId": "signup_api_v1_auth_signup_post",
        "tags": [
          "auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "summary": "Log in",
        "operationId": "login_api_v1_auth_login_post",
        "tags": [
          "auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "summary": "Get current user",
        "operationId": "me_api_v1_auth_me_get",
        "tags": [
          "auth"
        ],
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/billing/account": {
      "get": {
        "summary": "Get credit balance",
        "operationId": "account_api_v1_billing_account_get",
        "tags": [
          "billing"
        ],
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/billing/usage": {
      "get": {
        "summary": "List usage records",
        "operationId": "usage_api_v1_billing_usage_get",
        "tags": [
          "billing"
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs": {
      "post": {
        "summary": "Create a hosted SharpX run",
        "operationId": "create_run_api_v1_runs_post",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "summary": "List hosted SharpX runs",
        "operationId": "list_runs_api_v1_runs_get",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}": {
      "get": {
        "summary": "Get a hosted SharpX run",
        "operationId": "get_run_api_v1_runs_run_id_get",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/artifacts": {
      "get": {
        "summary": "List run artifacts",
        "operationId": "artifacts_api_v1_runs_run_id_artifacts_get",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/artifacts/{artifact_id}/download": {
      "get": {
        "summary": "Download a run artifact",
        "operationId": "download_artifact_api_v1_runs_run_id_artifacts_artifact_id_download_get",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "artifact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/workspace": {
      "get": {
        "summary": "Browse a run workspace",
        "operationId": "workspace_files_api_v1_runs_run_id_workspace_get",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/workspace/file": {
      "get": {
        "summary": "Read a text file from a run workspace",
        "operationId": "workspace_file_api_v1_runs_run_id_workspace_file_get",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/preview": {
      "get": {
        "summary": "Get run preview metadata",
        "operationId": "preview_manifest_api_v1_runs_run_id_preview_get",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/preview/{asset_path:path}": {
      "get": {
        "summary": "Serve a preview asset from a run workspace",
        "operationId": "preview_asset_api_v1_runs_run_id_preview_asset_path:path_get",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "asset_path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/export": {
      "get": {
        "summary": "Export a run workspace as a zip archive",
        "operationId": "export_workspace_api_v1_runs_run_id_export_get",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/cancel": {
      "post": {
        "summary": "Cancel a queued or running run",
        "operationId": "cancel_run_api_v1_runs_run_id_cancel_post",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/share": {
      "post": {
        "summary": "Create or refresh a public share link",
        "operationId": "share_run_api_v1_runs_run_id_share_post",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/fork": {
      "post": {
        "summary": "Fork a run into a new hosted run",
        "operationId": "fork_run_api_v1_runs_run_id_fork_post",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/events": {
      "get": {
        "summary": "Stream run events",
        "operationId": "events_api_v1_runs_run_id_events_get",
        "tags": [
          "runs"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/public/runs/{token}": {
      "get": {
        "summary": "Get a shared run",
        "operationId": "get_share_api_v1_public_runs_token_get",
        "tags": [
          "shares"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/public/runs/{token}/preview/{asset_path:path}": {
      "get": {
        "summary": "Serve a shared preview asset",
        "operationId": "preview_asset_api_v1_public_runs_token_preview_asset_path:path_get",
        "tags": [
          "shares"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "asset_path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/public/runs/{token}/artifacts/{artifact_id}/download": {
      "get": {
        "summary": "Download a shared artifact",
        "operationId": "download_artifact_api_v1_public_runs_token_artifacts_artifact_id_download_get",
        "tags": [
          "shares"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "artifact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/schedules": {
      "get": {
        "summary": "List recurring schedules",
        "operationId": "list_schedules_api_v1_schedules_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "post": {
        "summary": "Create a recurring schedule",
        "operationId": "create_schedule_api_v1_schedules_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/schedules/{schedule_id}": {
      "patch": {
        "summary": "Enable or disable a recurring schedule",
        "operationId": "toggle_schedule_api_v1_schedules_schedule_id_patch",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/schedules/{schedule_id}/run-now": {
      "post": {
        "summary": "Trigger a recurring schedule immediately",
        "operationId": "run_schedule_now_api_v1_schedules_schedule_id_run-now_post",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/github": {
      "get": {
        "summary": "List GitHub connections",
        "operationId": "list_github_connections_api_v1_integrations_github_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "put": {
        "summary": "Connect or update a GitHub repository",
        "operationId": "upsert_github_connection_api_v1_integrations_github_put",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/deployments": {
      "get": {
        "summary": "List deployment handoffs for a run",
        "operationId": "list_run_deployments_api_v1_runs_run_id_deployments_get",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "post": {
        "summary": "Create a deployment handoff for a run",
        "operationId": "create_run_deployment_api_v1_runs_run_id_deployments_post",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/deployments/{deployment_id}": {
      "get": {
        "summary": "Get a deployment handoff",
        "operationId": "get_run_deployment_api_v1_runs_run_id_deployments_deployment_id_get",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "deployment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/deployments/{deployment_id}/handoff": {
      "get": {
        "summary": "Download a deployment handoff markdown file",
        "operationId": "download_handoff_api_v1_runs_run_id_deployments_deployment_id_handoff_get",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "deployment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/webhooks": {
      "get": {
        "summary": "List webhook subscriptions",
        "operationId": "list_webhooks_api_v1_integrations_webhooks_get",
        "tags": [
          "webhooks"
        ],
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "post": {
        "summary": "Create a webhook subscription",
        "operationId": "create_webhook_api_v1_integrations_webhooks_post",
        "tags": [
          "webhooks"
        ],
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/webhooks/{webhook_id}": {
      "delete": {
        "summary": "Delete a webhook subscription",
        "operationId": "delete_webhook_api_v1_integrations_webhooks_webhook_id_delete",
        "tags": [
          "webhooks"
        ],
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/webhooks/{webhook_id}/deliveries": {
      "get": {
        "summary": "List webhook deliveries",
        "operationId": "list_webhook_deliveries_api_v1_integrations_webhooks_webhook_id_deliveries_get",
        "tags": [
          "webhooks"
        ],
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/templates": {
      "get": {
        "summary": "List run templates",
        "operationId": "list_templates_api_v1_templates_get",
        "tags": [
          "templates"
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "post": {
        "summary": "Create a run template from an existing run",
        "operationId": "create_template_api_v1_templates_post",
        "tags": [
          "templates"
        ],
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/templates/{template_id}/launch": {
      "post": {
        "summary": "Launch a run from a template",
        "operationId": "launch_template_api_v1_templates_template_id_launch_post",
        "tags": [
          "templates"
        ],
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/orgs": {
      "get": {
        "summary": "List my organizations",
        "operationId": "list_orgs_api_v1_orgs_get",
        "tags": [
          "orgs"
        ],
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "post": {
        "summary": "Create an organization",
        "operationId": "create_org_api_v1_orgs_post",
        "tags": [
          "orgs"
        ],
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/orgs/{org_id}/switch": {
      "post": {
        "summary": "Switch current organization",
        "operationId": "switch_org_api_v1_orgs_org_id_switch_post",
        "tags": [
          "orgs"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/orgs/{org_id}/members": {
      "get": {
        "summary": "List organization members",
        "operationId": "members_api_v1_orgs_org_id_members_get",
        "tags": [
          "orgs"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/orgs/{org_id}/invites": {
      "get": {
        "summary": "List organization invites",
        "operationId": "invites_api_v1_orgs_org_id_invites_get",
        "tags": [
          "orgs"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "post": {
        "summary": "Create an organization invite",
        "operationId": "create_invite_api_v1_orgs_org_id_invites_post",
        "tags": [
          "orgs"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/orgs/{org_id}/invites/{invite_id}": {
      "delete": {
        "summary": "Revoke an organization invite",
        "operationId": "revoke_invite_api_v1_orgs_org_id_invites_invite_id_delete",
        "tags": [
          "orgs"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "invite_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/orgs/{org_id}/members/{user_id}": {
      "patch": {
        "summary": "Update an organization member role",
        "operationId": "update_member_api_v1_orgs_org_id_members_user_id_patch",
        "tags": [
          "orgs"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/orgs/invites/accept": {
      "post": {
        "summary": "Accept an organization invite",
        "operationId": "accept_invite_api_v1_orgs_invites_accept_post",
        "tags": [
          "orgs"
        ],
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/secrets": {
      "get": {
        "summary": "List secret metadata",
        "operationId": "list_secrets_api_v1_secrets_get",
        "tags": [
          "secrets"
        ],
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/secrets/{name}": {
      "put": {
        "summary": "Create or update a secret",
        "operationId": "upsert_secret_api_v1_secrets_name_put",
        "tags": [
          "secrets"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/secrets/id/{secret_id}": {
      "delete": {
        "summary": "Delete a secret",
        "operationId": "delete_secret_api_v1_secrets_id_secret_id_delete",
        "tags": [
          "secrets"
        ],
        "parameters": [
          {
            "name": "secret_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/builder/generate": {
      "post": {
        "summary": "Generate a static web app from a prompt",
        "operationId": "generate_api_v1_builder_generate_post",
        "tags": [
          "builder"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/builder/workspace/detect": {
      "get": {
        "summary": "Detect active project toolchain",
        "operationId": "detect_workspace_api_v1_builder_workspace_detect_get",
        "tags": [
          "builder"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/builder/workspace/files": {
      "get": {
        "summary": "Get all project workspace files",
        "operationId": "get_workspace_files_api_v1_builder_workspace_files_get",
        "tags": [
          "builder"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/builder/workspace/write-file": {
      "post": {
        "summary": "Write or update a file in the project",
        "operationId": "write_workspace_file_api_v1_builder_workspace_write-file_post",
        "tags": [
          "builder"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/builder/workspace/delete-file": {
      "post": {
        "summary": "Delete a file in the project",
        "operationId": "delete_workspace_file_api_v1_builder_workspace_delete-file_post",
        "tags": [
          "builder"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/builder/workspace/preview-env": {
      "get": {
        "summary": "Get current workspace preview environment setting",
        "operationId": "get_preview_env_api_v1_builder_workspace_preview-env_get",
        "tags": [
          "builder"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "post": {
        "summary": "Update workspace preview environment setting",
        "operationId": "update_preview_env_api_v1_builder_workspace_preview-env_post",
        "tags": [
          "builder"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/builder/workspace/publish-cloud": {
      "post": {
        "summary": "Copy local files into a hosted cloud run workspace",
        "operationId": "publish_workspace_to_cloud_api_v1_builder_workspace_publish-cloud_post",
        "tags": [
          "builder"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/builder/workspace/pull-cloud": {
      "post": {
        "summary": "Overwrite local files with files from a cloud run workspace",
        "operationId": "pull_workspace_from_cloud_api_v1_builder_workspace_pull-cloud_post",
        "tags": [
          "builder"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/builder/workspace/diagnostics": {
      "get": {
        "summary": "Fetch local environment setup diagnostics checklist",
        "operationId": "get_workspace_diagnostics_api_v1_builder_workspace_diagnostics_get",
        "tags": [
          "builder"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/builder/workspace/setup-env": {
      "post": {
        "summary": "Run dependencies installation and venv setups inside the workspace",
        "operationId": "setup_workspace_environment_api_v1_builder_workspace_setup-env_post",
        "tags": [
          "builder"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting": {
      "get": {
        "summary": "List hosting connections for the current org",
        "operationId": "list_connections_api_v1_integrations_hosting_get",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting/{provider}/connect": {
      "post": {
        "summary": "Begin the OAuth flow for a hosting provider",
        "operationId": "connect_api_v1_integrations_hosting_provider_connect_post",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting/{provider}/callback": {
      "get": {
        "summary": "OAuth callback \u2014 completes the connection and redirects to the SPA",
        "operationId": "callback_api_v1_integrations_hosting_provider_callback_get",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting/connections/{connection_id}": {
      "delete": {
        "summary": "Disconnect a hosting provider",
        "operationId": "delete_connection_api_v1_integrations_hosting_connections_connection_id_delete",
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting/connections/{connection_id}/settings": {
      "patch": {
        "summary": "Update build settings on a hosting connection",
        "operationId": "update_connection_settings_api_v1_integrations_hosting_connections_connection_id_settings_patch",
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting/connections/{connection_id}/health": {
      "post": {
        "summary": "Re-check a hosting connection's credentials",
        "operationId": "check_connection_health_api_v1_integrations_hosting_connections_connection_id_health_post",
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting/connections/{connection_id}/refresh": {
      "post": {
        "summary": "Refresh a hosting connection's access token",
        "operationId": "refresh_connection_api_v1_integrations_hosting_connections_connection_id_refresh_post",
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting/deployments/bulk-delete": {
      "post": {
        "summary": "Delete multiple hosting deployments at once",
        "operationId": "bulk_delete_deployments_api_v1_integrations_hosting_deployments_bulk-delete_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting/schedules": {
      "get": {
        "summary": "List hosting schedules for the current org",
        "operationId": "list_schedules_api_v1_integrations_hosting_schedules_get",
        "parameters": [
          {
            "name": "hosting_connection_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "post": {
        "summary": "Create a hosting schedule",
        "operationId": "create_schedule_api_v1_integrations_hosting_schedules_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting/schedules/{schedule_id}": {
      "patch": {
        "summary": "Update a hosting schedule",
        "operationId": "update_schedule_api_v1_integrations_hosting_schedules_schedule_id_patch",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "delete": {
        "summary": "Delete a hosting schedule",
        "operationId": "delete_schedule_api_v1_integrations_hosting_schedules_schedule_id_delete",
        "parameters": [
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/hosting/deployments": {
      "post": {
        "summary": "Deploy a SharpX run to a connected hosting provider",
        "operationId": "create_deployment_api_v1_integrations_hosting_deployments_post",
        "parameters": [
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "summary": "List hosting deployments for the current org",
        "operationId": "list_deployments_api_v1_integrations_hosting_deployments_get",
        "parameters": [
          {
            "name": "run_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/items": {
      "get": {
        "summary": "List items",
        "operationId": "list_items_api_v1_items_get",
        "tags": [
          "items"
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "post": {
        "summary": "Create an item",
        "operationId": "create_item_api_v1_items_post",
        "tags": [
          "items"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/items/{item_id}": {
      "get": {
        "summary": "Fetch an item",
        "operationId": "get_item_api_v1_items_item_id_get",
        "tags": [
          "items"
        ],
        "parameters": [
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "patch": {
        "summary": "Update an item",
        "operationId": "update_item_api_v1_items_item_id_patch",
        "tags": [
          "items"
        ],
        "parameters": [
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "delete": {
        "summary": "Delete an item",
        "operationId": "delete_item_api_v1_items_item_id_delete",
        "tags": [
          "items"
        ],
        "parameters": [
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "auth"
    },
    {
      "name": "billing"
    },
    {
      "name": "builder"
    },
    {
      "name": "health"
    },
    {
      "name": "items"
    },
    {
      "name": "orgs"
    },
    {
      "name": "runs"
    },
    {
      "name": "secrets"
    },
    {
      "name": "shares"
    },
    {
      "name": "templates"
    },
    {
      "name": "webhooks"
    }
  ]
}