Delete a workflow type
post
https://api.expiryedge.com/v1/deleteWorkflowTypeeditor or admin60/minAny method
Request
curl -X POST 'https://api.expiryedge.com/v1/deleteWorkflowType' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "wtype_R4c2",
"moveToTypeId": "wtype_P0k9"
}'Response
{
"success": true,
"message": "Workflow type deleted successfully",
"workflows_affected": 3,
"workflow_runs_affected": 7
}If workflows or runs use the type, send moveToTypeId (move them) or deleteWorkflows: true (delete those workflows, runs and comments); otherwise 400 with requires_action: true and the counts.
Authentication failures currently return 500 {error} from this handler, not 401.
The web app sends DELETE (with a JSON body); any HTTP method is accepted.
idstringrequiredmoveToTypeIdstringdeleteWorkflowsboolean
200
Deleted.
successbooleanmessagestringworkflows_affectedintegerworkflow_runs_affectedinteger
400 | Missing id, invalid moveToTypeId, or the type is in use and no action was chosen. |
401 | Missing, expired or invalid bearer token. |
403 | Authenticated, but your role or organization does not allow this action. |
404 | The record does not exist or is not in your organization. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
500 | Unexpected server error. Retry later; quote requestId to support. |
