# Workflows > Manage workflow definitions and view run history ## List Workflows Endpoint `GET /workflows` List all workflow templates. **Parameters:** - `workflow_type` (query): string - `include_archived` (query): boolean - `page` (query): integer - `page_size` (query): integer - `order_by` (query): string **Response (200):** `WorkflowListResponse` ## Create Workflow Endpoint `POST /workflows` Create a new workflow template. **Request Body:** `CreateWorkflowRequest` **Response (201):** `CreateWorkflowResponse` ## Get Workflow Endpoint `GET /workflows/{workflow_id}` Get workflow details by ID. **Parameters:** - `workflow_id` (path) (required): string **Response (200):** `WorkflowResponse` ## Archive (soft-delete) a workflow template `DELETE /workflows/{workflow_id}` Archive (soft-delete) a workflow template. Archived templates are excluded from listing by default but remain accessible via `GET /workflows/{id}` and with `?include_archived=true`. **Parameters:** - `workflow_id` (path) (required): string **Response (200):** `DeleteWorkflowResponse` ## List Workflow Runs Endpoint `GET /workflows/{workflow_id}/runs` List all execution runs for a workflow. **Parameters:** - `workflow_id` (path) (required): string **Response (200):** `ExecutionRunListResponse` ## Get Workflow History Endpoint `GET /workflows/{workflow_id}/history` DEPRECATED: Use /workflows/{workflow_id}/runs instead. **Parameters:** - `workflow_id` (path) (required): string **Response (200):** `ExecutionHistoryResponse` ## Validate Yaml Endpoint `POST /workflows/validate` Validate a workflow YAML file. **Request Body:** `ValidateYamlRequest` **Response (200):** `ValidateYamlResponse` ## Update Phase Prompt Endpoint `PUT /workflows/{workflow_id}/phases/{phase_id}` Update a workflow phase's prompt template and optional config. **Parameters:** - `workflow_id` (path) (required): string - `phase_id` (path) (required): string **Request Body:** `UpdatePhasePromptRequest` **Response (200):** `UpdatePhaseResponse`