# Move one or more workflows into trash state Moves one or more workflows into trash state. To get workflow IDs, use the workflows list view API [Get Workflows list](https://www.manageengine.com/products/desktop-central/help/api/cloud/dex-get-published-resources.html). ## Endpoints **POST** `/intelligence/workflow/api/flow/moveToTrash` ## Request URL `https://[{serverurl}](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)/intelligence/workflow/api/flow/moveToTrash` ## Scope `DesktopCentralCloud.Platform.DELETE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Content-Type** (string, Mandatory): `application/moveWorkflowToTrash.v1+json` - **Accept** (string, Mandatory): `application/moveWorkflowToTrashStatusUpdate.v1+json` ### Request Body `application/json` - **workflowIds** (array, Optional): Array of workflow IDs (long) to move to trash. Max 200 items. ## Sample Request ```curl 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 ```json { "workflowIds": [ 101, 102, 103 ] } ``` ### Move a single workflow to trash ```json { "workflowIds": [ 101 ] } ``` ## Response Parameters ### HTTP Code 200 Response body: `application/json` - **status** (string): Result of the operation: 'success' or 'failure'. - **message** (string): A confirmation message about the trash operation. ### HTTP Code 400 Response body: `application/json` - **errorCode** (string): Error code when workflow IDs are missing. - **errorMessage** (string): Details about what is missing in the request. ### HTTP Code 401 Response body: `application/json` - **errorCode** (string): Error code when you don't have permission for this workflow. - **errorMessage** (string): Details about the permission issue. ### HTTP Code 500 Response body: `application/json` - **statusCode** (string): HTTP status code (500). - **errorCode** (string): Internal error code identifying the server-side failure. - **message** (string): Error message describing the server-side failure. ## Possible Response Codes - **200**: HTTP code - **400**: HTTP code - **401**: HTTP code - **500**: HTTP code ## Sample Response: HTTP 200 ### Single workflow moved to trash ```json { "message": "Workflow moved to trash successfully", "status": "success" } ``` ### Multiple workflows moved to trash ```json { "message": "Selected workflows moved to trash successfully", "status": "success" } ``` ## Sample Response: HTTP 400 ### No workflow IDs provided ```json { "errorMessage": "Workflow ID not present. Provide at least one workflow ID.", "errorCode": "BAD_REQUEST" } ``` ## Sample Response: HTTP 401 ### You do not have permission for this workflow ```json { "errorMessage": "Workflow is not in the authorized user scope for trash operation.", "errorCode": "UNAUTHORIZED" } ``` ## Sample Response: HTTP 500 ### Server error ```json { "errorMessage": "An internal error occurred.", "errorCode": "INTERNAL_ERROR" } ``` ## Rate Limit **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.