Delete Todo Workflow
This guide shows how to build a Delete Todo API using DotPortion’s visual workflow builder, where the todo is deleted based on its ID provided in the request body. This workflow:- Uses request body only
- Does not use path params
- Does not use query params
What We’re Building
Endpoint:Delete an existing todo item by providing its ID in the request body.
Request Body Shape
Before You Start
Make sure you have:- Created the Todo Project
- Defined the Todo Schema
- Inserted at least one todo
- Built the Create Todo workflow
- Selected a database (Platform DB or MongoDB)
Step 1: Create a New Workflow
- Open your project
- Click New Workflow
- Name it:
delete-todo
🖼️ Workflow Creation (UI Reference)
Step 2: Configure API Start Node
Select the API Start Node and configure:- Method:
DELETE - Path:
/todo
🖼️ API Start Node Configuration
Step 3: Add Parameter Node (Body)
Add a Parameter Node to extract the todo ID from the request body. Configure:| Field | Source | Type | Required |
|---|---|---|---|
| id | Body | String | Yes |
🖼️ Parameter Node Configuration
Step 4: Add Database Node
Add a Database Node to delete the todo from the database. Configure:- Database: Platform DB or MongoDB
- Collection:
todos - Operation:
deleteOne - Filter:
🖼️ Database Delete Configuration
Step 5: Add Response Node
Add a Response Node to confirm deletion. Configure:- Status Code:
200 - Response Body:
🖼️ Response Node Configuration
Step 6: Connect the Nodes
Connect the nodes in this order:🖼️ Final Workflow Graph
Step 7: Deploy the Workflow
Click Deploy to make the API live. Once deployed, the delete endpoint is available immediately.Testing the Workflow
Send a request body like:- Validate body input
- Observe the delete operation
- Confirm successful execution
🖼️ Realtime Executor View