{
  "openapi": "3.0.3",
  "info": {
    "title": "Data-flo Studio API",
    "version": "218.0.0",
    "description": "Workflow, sharing, file storage and debugging endpoints. Workflow permissions still apply to public and authenticated requests. Most legacy handlers do not enforce HTTP methods; the methods below describe their intended use. Sign in through the application or supply an access-token header. Debugger source parameters refer to server-local files."
  },
  "servers": [
    {
      "url": "/",
      "description": "Current Studio instance"
    }
  ],
  "components": {
    "securitySchemes": {
      "accessToken": {
        "type": "apiKey",
        "in": "header",
        "name": "access-token"
      },
      "session": {
        "type": "apiKey",
        "in": "cookie",
        "name": "next-auth.session-token",
        "description": "Sign in through the application. HTTPS deployments use __Secure-next-auth.session-token. Browsers send the session cookie automatically on same-origin requests."
      }
    },
    "parameters": {
      "WorkflowId": {
        "name": "id",
        "in": "query",
        "required": true,
        "description": "Workflow identifier or slug.",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid or missing input."
      },
      "Unauthorized": {
        "description": "Authentication required or invalid access token."
      },
      "NotFound": {
        "description": "Workflow not found or inaccessible with the required role."
      },
      "Boolean": {
        "description": "Operation completed.",
        "content": {
          "application/json": {
            "schema": {
              "type": "boolean",
              "example": true
            }
          }
        }
      }
    },
    "schemas": {
      "Manifest": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "version": {
            "type": "integer",
            "example": 3
          },
          "input": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "output": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "transform": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "Metadata": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "Role": {
        "type": "string",
        "enum": [
          "runner",
          "viewer",
          "editor",
          "manager"
        ]
      },
      "WorkflowExport": {
        "type": "object",
        "required": [
          "manifest"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "manifest": {
            "$ref": "#/components/schemas/Manifest"
          }
        }
      },
      "WorkflowSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "binned": {
            "type": "boolean"
          },
          "role": {
            "type": "string",
            "description": "Effective role, including owner."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  },
  "paths": {
    "/api/counter": {
      "post": {
        "tags": [
          "Example"
        ],
        "summary": "Echo an amount after a short delay",
        "operationId": "counter_post",
        "security": [],
        "responses": {
          "200": {
            "description": "Echoed amount.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "number",
                      "example": 1
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "default": 1
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workflows/save": {
      "post": {
        "tags": [
          "workflows"
        ],
        "summary": "Save workflow metadata and manifest",
        "operationId": "workflows_save_post",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Boolean"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires editor access to the workflow.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "meta",
                  "manifest"
                ],
                "properties": {
                  "meta": {
                    "$ref": "#/components/schemas/Metadata"
                  },
                  "manifest": {
                    "$ref": "#/components/schemas/Manifest"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workflows/run": {
      "get": {
        "tags": [
          "workflows"
        ],
        "summary": "Run a workflow",
        "operationId": "workflows_run_get",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Execution result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "description": "Engine execution status."
                    },
                    "duration": {
                      "type": "number"
                    },
                    "error": {
                      "description": "Execution error, when present."
                    },
                    "outputs": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires runner access. Inputs use workflow-defined names. Query parameters take precedence over JSON body inputs. Execution failures may be returned in an HTTP 200 result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ]
      },
      "post": {
        "tags": [
          "workflows"
        ],
        "summary": "Run a workflow",
        "operationId": "workflows_run_post",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Execution result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "description": "Engine execution status."
                    },
                    "duration": {
                      "type": "number"
                    },
                    "error": {
                      "description": "Execution error, when present."
                    },
                    "outputs": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires runner access. Inputs use workflow-defined names. Query parameters take precedence over JSON body inputs. Execution failures may be returned in an HTTP 200 result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/workflows/manifest": {
      "get": {
        "tags": [
          "workflows"
        ],
        "summary": "Get an editable workflow manifest",
        "operationId": "workflows_manifest_get",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Manifest and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "manifest": {
                      "$ref": "#/components/schemas/Manifest"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Metadata"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires editor access to the workflow.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ]
      }
    },
    "/api/workflows/list": {
      "get": {
        "tags": [
          "workflows"
        ],
        "summary": "List accessible workflows",
        "operationId": "workflows_list_get",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Accessible workflows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowSummary"
                  }
                }
              }
            }
          }
        },
        "description": "Lists workflows available with runner access, newest first. Anonymous users see accessible public workflows.",
        "parameters": [
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "me",
                "other"
              ]
            }
          },
          {
            "name": "binned",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ]
      }
    },
    "/api/workflows/import": {
      "post": {
        "tags": [
          "workflows"
        ],
        "summary": "Import a .dataflo JSON document",
        "operationId": "workflows_import_post",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Imported workflow.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Send the raw JSON export array, not multipart form data. The last imported workflow is returned.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "$ref": "#/components/schemas/WorkflowExport"
                }
              }
            }
          }
        }
      }
    },
    "/api/workflows/export": {
      "get": {
        "tags": [
          "workflows"
        ],
        "summary": "Download a workflow and its exportable dependencies",
        "operationId": "workflows_export_get",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Exported workflows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowExport"
                  }
                }
              }
            },
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires viewer access. Only workflows owned by the user or public workflows are included. Returns a JSON .dataflo attachment.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ]
      }
    },
    "/api/workflows/details": {
      "get": {
        "tags": [
          "workflows"
        ],
        "summary": "Get workflow metadata and inputs/outputs",
        "operationId": "workflows_details_get",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "description": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "input": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "role": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires runner access to the workflow.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ]
      }
    },
    "/api/workflows/debug": {
      "get": {
        "tags": [
          "workflows"
        ],
        "summary": "Run a workflow in debug mode",
        "operationId": "workflows_debug_get",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Engine debug result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires manager access. Accepts workflow-defined inputs through query parameters or the JSON body; query values take precedence. Returns the complete engine debug result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ]
      },
      "post": {
        "tags": [
          "workflows"
        ],
        "summary": "Run a workflow in debug mode",
        "operationId": "workflows_debug_post",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Engine debug result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires manager access. Accepts workflow-defined inputs through query parameters or the JSON body; query values take precedence. Returns the complete engine debug result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/workflows/create": {
      "get": {
        "tags": [
          "workflows"
        ],
        "summary": "Create or clone a workflow",
        "operationId": "workflows_create_get",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "307": {
            "description": "Redirect to the editor or sign-in.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "description": "Creates a workflow and redirects to its editor. Optional id clones a workflow with viewer access. Unauthenticated requests redirect to sign-in.",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Source workflow to clone."
          }
        ]
      }
    },
    "/api/workflows/bin": {
      "post": {
        "tags": [
          "workflows"
        ],
        "summary": "Move a workflow to or from the bin",
        "operationId": "workflows_bin_post",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Boolean"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires manager access to the workflow.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "binned"
                ],
                "properties": {
                  "binned": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workflows/access": {
      "get": {
        "tags": [
          "workflows"
        ],
        "summary": "Get workflow access and shares",
        "operationId": "workflows_access_get",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow access settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "alias": {
                      "type": "string"
                    },
                    "linkUrl": {
                      "type": "string"
                    },
                    "aliasUrl": {
                      "nullable": true,
                      "type": "string"
                    },
                    "accessLevel": {
                      "type": "string",
                      "enum": [
                        "private",
                        "restricted",
                        "public"
                      ]
                    },
                    "shares": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "user",
                              "invitation"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "email": {
                            "type": "string",
                            "format": "email"
                          },
                          "role": {
                            "$ref": "#/components/schemas/Role"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires manager access to the workflow.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ]
      },
      "post": {
        "tags": [
          "workflows"
        ],
        "summary": "Change workflow visibility",
        "operationId": "workflows_access_post",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Boolean"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "description": "Method not allowed."
          }
        },
        "description": "Requires manager access to the workflow.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "access"
                ],
                "properties": {
                  "access": {
                    "type": "string",
                    "enum": [
                      "private",
                      "restricted",
                      "public"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/user/share-emails": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "List previously used sharing email addresses",
        "operationId": "user_share_emails_get",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Email addresses.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/api/user/access-token": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Create a long-lived API access token",
        "operationId": "user_access_token_get",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Access token.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "token"
                  ],
                  "properties": {
                    "token": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "description": "Requires authentication. Returns a token valid for five years. Send it in the access-token header on later API calls."
      }
    },
    "/api/shares/update": {
      "post": {
        "tags": [
          "shares"
        ],
        "summary": "Update a workflow share role",
        "operationId": "shares_update_post",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Boolean"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires manager access. Updates an existing user share (not a pending invitation).",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "role"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "role": {
                    "$ref": "#/components/schemas/Role"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shares/remove": {
      "post": {
        "tags": [
          "shares"
        ],
        "summary": "Remove a workflow share",
        "operationId": "shares_remove_post",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Share removed; empty body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires manager access. Removes a pending invitation or an existing user share.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shares/add": {
      "post": {
        "tags": [
          "shares"
        ],
        "summary": "Invite users to a workflow",
        "operationId": "shares_add_post",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Boolean"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires authentication and manager access. Sends an invitation email to each address.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "emails",
                  "role"
                ],
                "properties": {
                  "emails": {
                    "type": "array",
                    "maxItems": 30,
                    "items": {
                      "type": "string",
                      "format": "email"
                    }
                  },
                  "role": {
                    "$ref": "#/components/schemas/Role"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shares/accept": {
      "get": {
        "tags": [
          "shares"
        ],
        "summary": "Accept a workflow invitation",
        "operationId": "shares_accept_get",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "307": {
            "description": "Redirect to workflow, sign-in, or invalid-invitation page.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "description": "Converts an invitation to a user share and redirects to the workflow. Unauthenticated users redirect to sign-in; invalid invitations redirect to the error page.",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Invitation token (first 22 characters are used)."
          }
        ]
      }
    },
    "/api/files/store": {
      "post": {
        "tags": [
          "files"
        ],
        "summary": "Store a file",
        "operationId": "files_store_post",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Stored file.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hash": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "description": "Send the raw file bytes, not multipart form data. application/x-www-form-urlencoded is treated as a gzip-compressed stream by this legacy endpoint.",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      }
    },
    "/api/feedback/send": {
      "post": {
        "tags": [
          "feedback"
        ],
        "summary": "Send feedback to the help desk",
        "operationId": "feedback_send_post",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Feedback sent; empty body."
          }
        },
        "description": "Sends email using the server's SMTP configuration. Optional screenshotImage is used as an attachment path or data URI. Request body limit is 16 MB.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emailAddress": {
                    "type": "string",
                    "format": "email"
                  },
                  "feedbackText": {
                    "type": "string"
                  },
                  "screenshotImage": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/debugger/workflows": {
      "get": {
        "tags": [
          "debugger"
        ],
        "summary": "List workflows available to the debugger",
        "operationId": "debugger_workflows_get",
        "security": [
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Workflows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "description": "Requires authentication. Returns non-binned workflows with viewer access, newest first."
      }
    },
    "/api/debugger/workflow-manifest": {
      "get": {
        "tags": [
          "debugger"
        ],
        "summary": "Get workflow input/output definitions",
        "operationId": "debugger_workflow_manifest_get",
        "security": [
          {},
          {
            "session": []
          },
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Input/output definitions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "input": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "Requires viewer access.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowId"
          }
        ]
      }
    },
    "/api/debugger/file": {
      "get": {
        "tags": [
          "debugger"
        ],
        "summary": "Inspect a server-local text file",
        "operationId": "debugger_file_get",
        "security": [],
        "responses": {
          "200": {
            "description": "Metadata in info mode; raw bytes in raw/download mode.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lines": {
                      "type": "integer"
                    },
                    "size": {
                      "type": "string"
                    }
                  }
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "description": "Uses a server-local source path. This legacy debugger endpoint does not enforce authentication. Use mode=info for metadata or mode=raw for a range; file endpoints also support download.",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Server-local source path."
          },
          {
            "name": "mode",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "info",
                "raw",
                "download"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Start offset for raw mode, required when mode=raw."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "End offset for raw mode, required when mode=raw."
          }
        ]
      }
    },
    "/api/debugger/datatable": {
      "get": {
        "tags": [
          "debugger"
        ],
        "summary": "Inspect a server-local CSV datatable",
        "operationId": "debugger_datatable_get",
        "security": [],
        "responses": {
          "200": {
            "description": "Metadata in info mode; raw bytes in raw/download mode.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "integer"
                    },
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "size": {
                      "type": "string"
                    }
                  }
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "description": "Uses a server-local source path. This legacy debugger endpoint does not enforce authentication. Use mode=info for metadata or mode=raw for a range; file endpoints also support download.",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Server-local source path."
          },
          {
            "name": "mode",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "info",
                "raw"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Start offset for raw mode, required when mode=raw."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "End offset for raw mode, required when mode=raw."
          }
        ]
      }
    },
    "/api/auth/providers": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "operationId": "auth_providers_get",
        "summary": "List configured sign-in providers",
        "security": [],
        "responses": {
          "200": {
            "description": "NextAuth response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/session": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "operationId": "auth_session_get",
        "summary": "Get the current session",
        "security": [],
        "responses": {
          "200": {
            "description": "NextAuth response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/csrf": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "operationId": "auth_csrf_get",
        "summary": "Get a CSRF token",
        "security": [],
        "responses": {
          "200": {
            "description": "NextAuth response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "csrfToken": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/signin": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "operationId": "auth_signin_get",
        "summary": "Show the signin page",
        "security": [],
        "responses": {
          "200": {
            "description": "NextAuth HTML page.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "302": {
            "description": "Redirect to the configured authentication page."
          }
        }
      },
      "post": {
        "tags": [
          "Authentication"
        ],
        "operationId": "auth_signin_post",
        "summary": "Submit signin",
        "description": "NextAuth-managed flow. Obtain a CSRF token first. Provider-specific sign-in uses /api/auth/signin/{provider}.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "csrfToken"
                ],
                "properties": {
                  "csrfToken": {
                    "type": "string"
                  },
                  "callbackUrl": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "NextAuth response."
          },
          "302": {
            "description": "Authentication redirect."
          }
        }
      }
    },
    "/api/auth/signout": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "operationId": "auth_signout_get",
        "summary": "Show the signout page",
        "security": [],
        "responses": {
          "200": {
            "description": "NextAuth HTML page.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "302": {
            "description": "Redirect to the configured authentication page."
          }
        }
      },
      "post": {
        "tags": [
          "Authentication"
        ],
        "operationId": "auth_signout_post",
        "summary": "Submit signout",
        "description": "NextAuth-managed flow. Obtain a CSRF token first. Provider-specific sign-in uses /api/auth/signin/{provider}.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "csrfToken"
                ],
                "properties": {
                  "csrfToken": {
                    "type": "string"
                  },
                  "callbackUrl": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "NextAuth response."
          },
          "302": {
            "description": "Authentication redirect."
          }
        }
      }
    }
  },
  "tags": []
}
