Deletes a workflow.

POSThttps://api.awork.com/api/v1/workflows/{workflowId}/delete
POST https://api.awork.com/api/v1/workflows/{workflowId}/delete

Deletes a workflow. If the workflow is linked to projects or project templates they can either be unlinked or migrated to another workflow before the workflow is deleted.

Authentication

AuthorizationBearer

Send your token in the Authorization: Bearer <token> header. See Authentication for API keys and OAuth.

Path parameters

workflowIdstringRequired
format: uuid

Request body Required

application/json

deleteOperationstring or nullOptional

Defines how linked projects and project templates should be handled before deletion. Supported values are 'unlink' and 'migrate'.

newWorkflowIdstring or nullOptional
format: uuid

The workflow to migrate linked projects and project templates to. Required when DeleteOperation is 'migrate'.

projectStatusMappingarray of object or nullOptional

Maps source workflow project statuses to target workflow project statuses during migration.

Show 2 properties
oldProjectStatusIdstringRequired
format: uuid

The Id of the existing project status to replace.

newProjectStatusIdstringRequired
format: uuid

The Id of the workflow project status to use instead.

taskStatusMappingarray of object or nullOptional

Maps source workflow task statuses to target workflow task statuses during migration.

Show 2 properties
oldTaskStatusIdstringRequired
format: uuid

The Id of the existing task status to replace.

newTaskStatusIdstringRequired
format: uuid

The Id of the workflow task status to use instead.

keepCustomFieldsboolean or nullOptional

Whether to keep existing non-workflow custom fields when migrating. Default: true.

keepCustomAutomationsboolean or nullOptional

Whether to keep existing non-workflow automations when migrating. Default: true.

Responses

204 No Content
400 Bad Request

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

404 Not Found

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

Search documentation