Create a dynamic workflow and publish version 1. The request body contains the name, description, JavaScript, and optional input schema.
Prerequisites
Complete the endpoint and authentication configuration. See API Overview and Authentication.
Endpoint
POST /dynamic_workflows
Request bodynamestring (Required)Workflow name. Non-empty, up to 128 charactersdescription string (Optional)Workflow descriptionscript string (Required)Complete JavaScript. The first statement is a static export const meta; the body reads args and returns a JSON objectinput_schema object / null (Optional)Input constraint that describes the workflow args object. Omitting it, null, or {} all save as {}. If the root type is declared, it must be object. The service does not convert parameter types or fill in default values | Request example200 with the complete resource and version=1. A successful create is already published. The server generates the id; do not send a resource ID in the request body. |
Response fieldsidstringWorkflow ID in the format wf_<ULID>type stringFixed to dynamic_workflowname / description stringName and descriptionstatus / archived string / boolstatus is fixed to published; archived indicates whether the workflow is archivedversion intPublished version number. It is 1 after creationscript / input_schema string / objectComplete script and input schemacreated_at / updated_at stringCreation and last modification time, ISO 8601request_id stringUnique request identifier | Response example |