Delete a workflow type

posthttps://api.expiryedge.com/v1/deleteWorkflowType
editor or admin60/minJede Methode
Anfrage
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"
}'
Antwort
{
  "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.

Body-Parameter

application/json
  • idstringerforderlich
  • moveToTypeIdstring
  • deleteWorkflowsboolean

Rückgabe

200
Deleted.
  • successboolean
  • messagestring
  • workflows_affectedinteger
  • workflow_runs_affectedinteger

Fehler

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.