Workflows and apps
Set the workflow type
Switch a workflow between code and agent. Rewrite the files for the new type afterwards.
PATCH
https://cloud.generalinput.com/v1/workflows/:id/typeAuthenticationRequires
workflows:manage on a personal API key. A CLI session always passes.The runtime executes by the configured type, not by which files exist. After switching, replace the files with the new type's and delete the old type's before validating again.
The body accepts only code and agent, but nothing stops you pointing this at an app, which rewrites its type and leaves its bundle mismatched. Create apps with POST /v1/workflows and leave their type alone.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
workflowType | string | yes | code or agent. |
Response
{
"detail": { "id": "wf_01HX…", "workflowType": "agent", "…": "…" },
"forbiddenFiles": ["main.ts", "package.json", "tsconfig.json"]
}forbiddenFiles lists the old type's files that now fail validation if left in the bundle.