curl --request POST \
--url https://api.tela.com/workflow/runs/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tela.com/workflow/runs/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tela.com/workflow/runs/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tela.com/workflow/runs/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/workflow/runs/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tela.com/workflow/runs/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/workflow/runs/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "exec_01J9Z8Q4M6N2P8R1S3T5V7W9X",
"promptVersionId": "9d2e4f6a-1b3c-4d5e-8f70-1a2b3c4d5e6f",
"environment": "api",
"status": "completed",
"startedAt": "2026-09-01T12:00:00.000Z",
"completedAt": "2026-09-01T12:00:08.412Z",
"input": {
"invoice": {
"name": "invoice",
"type": "file",
"required": true,
"files": [
{
"fileUrl": "vault://files/invoice-0001.pdf",
"name": "invoice-0001.pdf",
"mimeType": "application/pdf"
}
]
}
},
"steps": [
{
"id": "extract",
"name": "Extract fields",
"actionId": "llm-completion",
"status": "completed",
"input": {
"canvasId": "5f0c1a2e-8b7d-4c3a-9e1f-2d4b6a8c0e12"
},
"output": {
"total": 1250.5
},
"error": null,
"metadata": {
"usage": {
"inputTokens": 812,
"outputTokens": 24
}
}
}
],
"output": {
"id": "extract",
"name": "Extract fields",
"status": "completed",
"output": {
"total": 1250.5
},
"error": null,
"metadata": {}
}
}Cancel a workflow run
Requests cancellation of a run. Any queued or executing background jobs for the run are cancelled and the run is marked cancelled.
curl --request POST \
--url https://api.tela.com/workflow/runs/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tela.com/workflow/runs/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tela.com/workflow/runs/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tela.com/workflow/runs/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/workflow/runs/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tela.com/workflow/runs/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/workflow/runs/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "exec_01J9Z8Q4M6N2P8R1S3T5V7W9X",
"promptVersionId": "9d2e4f6a-1b3c-4d5e-8f70-1a2b3c4d5e6f",
"environment": "api",
"status": "completed",
"startedAt": "2026-09-01T12:00:00.000Z",
"completedAt": "2026-09-01T12:00:08.412Z",
"input": {
"invoice": {
"name": "invoice",
"type": "file",
"required": true,
"files": [
{
"fileUrl": "vault://files/invoice-0001.pdf",
"name": "invoice-0001.pdf",
"mimeType": "application/pdf"
}
]
}
},
"steps": [
{
"id": "extract",
"name": "Extract fields",
"actionId": "llm-completion",
"status": "completed",
"input": {
"canvasId": "5f0c1a2e-8b7d-4c3a-9e1f-2d4b6a8c0e12"
},
"output": {
"total": 1250.5
},
"error": null,
"metadata": {
"usage": {
"inputTokens": 812,
"outputTokens": 24
}
}
}
],
"output": {
"id": "extract",
"name": "Extract fields",
"status": "completed",
"output": {
"total": 1250.5
},
"error": null,
"metadata": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Workflow run id or external execution id.
Response
The run after cancellation (without graph).
External execution id when the run was started through the public API, otherwise the internal run id.
Lifecycle status of a workflow run. Terminal statuses are completed, cancelled, failed and timeout.
requires-action and waiting-for-review are active states where the run is paused for external input.
pending, running, completed, failed, requires-action, cancelled, timeout, waiting-for-review Runtime variables the run was started with, keyed by variable name.
Visible steps in topological order. Steps on unselected condition branches or outside a partial run's start/end range are reported as skipped.
Show child attributes
Show child attributes
Surface that started the run.
test-case, craft-preview, api, workstation The completed leaf step whose output is the run's result. null while no leaf step has completed.
Show child attributes
Show child attributes