Skip to main content
POST
/
v2
/
workflow
/
definitions
/
delete
Delete Definition
curl --request POST \
  --url https://api.velt.dev/v2/workflow/definitions/delete \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "definitionId": "<string>",
    "organizationId": "<string>",
    "documentId": "<string>"
  }
}
'
{
  "result": {
    "deleted": true,
    "definitionId": "marketing-copy-approval"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.velt.dev/llms.txt

Use this file to discover all available pages before exploring further.

Use this API to soft-delete (tombstone) a workflow definition. Tombstoned definitions are filtered from get and list. Definitions with in-flight executions cannot be deleted.

Endpoint

POST https://api.velt.dev/v2/workflow/definitions/delete

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

Delete a definition

{
  "data": {
    "definitionId": "marketing-copy-approval"
  }
}

Response

Success Response

{
  "result": {
    "deleted": true,
    "definitionId": "marketing-copy-approval"
  }
}

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "FAILED_PRECONDITION"
  }
}
Errors: NOT_FOUND (definition does not exist) / FAILED_PRECONDITION (in-flight executions exist).
{
  "result": {
    "deleted": true,
    "definitionId": "marketing-copy-approval"
  }
}