---
updatedAt: 2026-05-28T07:49:47.000Z
agentTools:
  projectIndex: https://finp2p-docs.ownera.io/llms.txt
---

# Cancel workflow

Cancel workflow - this method is deprecated, use /workflow/{workflowId}/cancel

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Operational API",
    "description": "This is the operational API reference for adapter development.",
    "termsOfService": "https://ownera.io/terms/",
    "contact": {
      "email": "support@ownera.io"
    },
    "version": "0.28"
  },
  "tags": [
    {
      "name": "workflow",
      "description": "Workflow administration and control operations"
    }
  ],
  "paths": {
    "/workflow/cancel": {
      "post": {
        "tags": [
          "workflow"
        ],
        "summary": "Cancel workflow",
        "description": "Cancel workflow - this method is deprecated, use /workflow/{workflowId}/cancel",
        "operationId": "cancelWorkflow",
        "deprecated": true,
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "$ref": "#/components/schemas/nonce"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cancelWorkflow"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "workflow queued for cancelling"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 1002,
                      "message": "Invalid request format"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 3000,
                      "message": "Authentication error"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 3400,
                      "message": "Access denied"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 1100,
                      "message": "Resource not found"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 2000,
                      "message": "General server error"
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 6101,
                      "message": "Failed to connect to external service"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 2002,
                      "message": "Service unavailable"
                    }
                  ]
                }
              }
            }
          },
          "504": {
            "description": "Gateway Timeout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 2003,
                      "message": "Gateway timeout"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "cancelWorkflow": {
        "type": "object",
        "required": [
          "workflowId"
        ],
        "properties": {
          "workflowId": {
            "type": "string",
            "format": "uuid",
            "pattern": ".*\\S.*",
            "x-autoMinLength": true
          },
          "reason": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1
          }
        }
      },
      "nonce": {
        "type": "string",
        "description": "32 bytes buffer (24 randomly generated bytes by the client + 8 bytes epoch timestamp seconds) encoded to hex:\n\n  const nonce = Buffer.alloc(32);\n  nonce.fill(crypto.randomBytes(24), 0, 24);\n\n  const nowEpochSeconds = Math.floor(new Date().getTime() / 1000);\n  const t = BigInt(nowEpochSeconds);\n  nonce.writeBigInt64BE(t, 24);\n",
        "x-allowEmpty": true
      },
      "APIError": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error code indicating the specific failure - for more information see [API Errors](./api-error-codes-reference).\n"
          },
          "message": {
            "type": "string",
            "description": "A descriptive message providing context about the error.",
            "pattern": ".*\\S.*",
            "x-autoMinLength": true
          }
        }
      },
      "APIErrors": {
        "type": "object",
        "required": [
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/APIError"
            }
          }
        }
      }
    }
  }
}
```