API to delete workflow folder

Goal: I want to delete a workflow using the API.
Issue: The "Delete Folder" API returns an error: "Folder not found."

Hi @Akshath_Tiwari, and welcome to the forum!

The error you're getting may indicate that you're endpoint is not correct (from your screenshot it seems a dev endpoint, could it be that the environment is not a production one) or that the id is not correct. I see you're passing workflow_373, could the endpoint be expecting a uuid?

In any case, this seems a private endpoint, so there doens't seem much I can do to help, unless you're able to share more info with regards to what the endpoint is expecting.

Best,
Miguel


There is no problem with the endpoint, I am able to get return response of the same folder using GET folder API

Can you share a screenshot of the "API Request" section when you attempt the delete query?

{

"request": {

"url": "https://dev.ip.deloitte.com.au/api/v2/folders/workflow_373",

"method": "DELETE",

"body": "{\"recursive\":false}",

"headers": {

  "User-Agent": "Retool/2.0 (+https://docs.tryretool.com/docs/apis)",

  "Content-Type": "application/json",

  "Authorization": "---sanitized---",

  "X-Retool-Forwarded-For": "172.31.7.194"

}

},

"response": {

"data": {

  "success": false,

  "message": "Folder not found"

},

"headers": {

  "server": [

    "nginx/1.27.2"

  ],

  "date": [

    "Mon, 12 May 2025 09:14:21 GMT"

  ],

  "content-type": [

    "application/json; charset=utf-8"

  ],

  "content-length": [

    "46"

  ],

  "connection": [

    "keep-alive"

  ],

  "x-content-type-options": [

    "nosniff"

  ],

  "referrer-policy": [

    "no-referrer-when-downgrade"

  ],

  "x-request-id": [

    "eb2e80b8-4ab1-40be-86b6-d3394ac14e68"

  ],

  "set-cookie": [

    "in_retool_canary_group=never; Path=/; Expires=Tue, 13 May 2025 09:14:21 GMT; Secure; SameSite=Strict"

  ],

  "x-retool-api-version": [

    "3.179.0-undefined (Build undefined)"

  ],

  "retry-after": [

    "3.799"

  ],

  "x-ratelimit-limit": [

    "300"

  ],

  "x-ratelimit-remaining": [

    "293"

  ],

  "x-ratelimit-reset": [

    "Mon May 12 2025 09:14:25 GMT+0000 (Coordinated Universal Time)"

  ],

  "etag": [

    "W/\"2e-2IPbUXgEpzkSH8mWUw8jh4SCloU\""

  ],

  "vary": [

    "Accept-Encoding"

  ]

},

"status": 404,

"statusText": "Not Found"

}

}

Weird.... Well I don't know what the issue can be, but my impression is that it doesn't seem a Retool issue.

I've been using APIs with the same unified endpoint to create folders and workflows, manage groups, and assign permissions, all of which have worked fine. However, it seems there is no available API for deleting workflows.

Hey @Akshath_Tiwari - I just tested this out and can confirm that the DELETE endpoint, in particular, seems to be broken. I'll file a ticket internally, do some additional investigation, and provide an update here as soon as possible!