Move one or more workflows into trash state

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Moves one or more workflows into trash state.To get workflow IDs use workflows list view API Get Workflows list

Request URL

https://{serverurl}/intelligence/workflow/api/flow/moveToTrash

Scope

DesktopCentralCloud.Platform.DELETECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/moveWorkflowToTrash.v1+jsonapplication/moveWorkflowToTrash.v1+jsonCopied!
AcceptstringMandatory
application/moveWorkflowToTrashStatusUpdate.v1+jsonapplication/moveWorkflowToTrashStatusUpdate.v1+jsonCopied!

- Request Body

application/json
JSON Object
Hide Sub-Attributes
workflowIdsarrayOptional

Array of workflow IDs (long) to move to trash. Max 200 items

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomains/intelligence/workflow/api/flow/moveToTrash \
  --header 'Accept: application/moveWorkflowToTrashStatusUpdate.v1+json' \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/moveWorkflowToTrash.v1+json' \
  --data '{}'

Sample Request Body

Move multiple workflows to trash

Copied!
  {
    "workflowIds": [
      101,
      102,
      103
    ]
  }
                
Show full

Move a single workflow to trash

Copied!
  {
    "workflowIds": [
      101
    ]
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
statusstring

Result of the operation: 'success' or 'failure'

messagestring

A confirmation message about the trash operation

- HTTP code 400

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodestring

Error code when workflow IDs are missing

errorMessagestring

Details about what is missing in the request

- HTTP code 401

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodestring

Error code when you don't have permission for this workflow

errorMessagestring

Details about the permission issue

- HTTP code 500

Response Body - application/json
JSON Object
Hide Sub-Attributes
statusCodestring

HTTP status code (500)

errorCodestring

Internal error code identifying the server-side failure

messagestring

Error message describing the server-side failure

Possible Response Codes

200HTTP code
400HTTP code
401HTTP code
500HTTP code

Sample Response: HTTP 200

Single workflow moved to trash

Copied!
  {
    "message": "Workflow moved to trash successfully",
    "status": "success"
  }
                
Show full

Multiple workflows moved to trash

Copied!
  {
    "message": "Selected workflows moved to trash successfully",
    "status": "success"
  }
                
Show full

Sample Response: HTTP 400

No workflow IDs provided

Copied!
  {
    "errorMessage": "Workflow ID not present. Provide at least one workflow ID.",
    "errorCode": "BAD_REQUEST"
  }
                
Show full

Sample Response: HTTP 401

You do not have permission for this workflow

Copied!
  {
    "errorMessage": "Workflow is not in the authorized user scope for trash operation.",
    "errorCode": "UNAUTHORIZED"
  }
                
Show full

Sample Response: HTTP 500

Server error

Copied!
  {
    "errorMessage": "An internal error occurred.",
    "errorCode": "INTERNAL_ERROR"
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.