Cancel Pathway Translation Run
curl --request POST \
--url https://api.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations"
headers = {"authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations', 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.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations",
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: <authorization>"
],
]);
$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.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "7250267f-851e-4353-bf04-b9c8fa67be31",
"status": "CANCELLED"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "TRANSLATION_RUN_FINALIZING",
"message": "the run is already finishing — it can no longer be cancelled"
}
]
}
{
"data": null,
"errors": [
{
"error": "TRANSLATION_RUN_TERMINAL",
"message": "the run already finished (COMPLETE)"
}
]
}
{
"data": null,
"errors": [
{
"error": "TRANSLATION_RUN_NOT_FOUND",
"message": "no translation run with that id"
}
]
}
Migration
Cancel Pathway Translation Run
Cancel a pending or running translation job.
POST
/
v2
/
agents
/
migrate
/
translations
/
{run_id}
/
cancellations
Cancel Pathway Translation Run
curl --request POST \
--url https://api.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations"
headers = {"authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations', 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.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations",
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: <authorization>"
],
]);
$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.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/migrate/translations/{run_id}/cancellations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "7250267f-851e-4353-bf04-b9c8fa67be31",
"status": "CANCELLED"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "TRANSLATION_RUN_FINALIZING",
"message": "the run is already finishing — it can no longer be cancelled"
}
]
}
{
"data": null,
"errors": [
{
"error": "TRANSLATION_RUN_TERMINAL",
"message": "the run already finished (COMPLETE)"
}
]
}
{
"data": null,
"errors": [
{
"error": "TRANSLATION_RUN_NOT_FOUND",
"message": "no translation run with that id"
}
]
}
Overview
Marks a job started with Start Pathway Translation asCANCELLED and stops its background work. Only runs in PENDING or RUNNING status can be cancelled; once a run is FINALIZING (creating the agent) or already terminal, the request returns 409. No body is required. Check the outcome with Get Pathway Translation Run.
Requires an admin, owner, operator, or prompter role.
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The run’s unique identifier. Returns
400 INVALID_RUN_ID if it is not a UUID and 404 TRANSLATION_RUN_NOT_FOUND if no run with that ID exists in your organization.Response
Returns202 on success. The run’s error_code becomes TRANSLATION_CANCELLED and no agent is created.
string
The cancelled run’s ID.
string
Always
CANCELLED.null | array
null on success, or a list of error objects if the request failed.{
"data": {
"id": "7250267f-851e-4353-bf04-b9c8fa67be31",
"status": "CANCELLED"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "TRANSLATION_RUN_FINALIZING",
"message": "the run is already finishing — it can no longer be cancelled"
}
]
}
{
"data": null,
"errors": [
{
"error": "TRANSLATION_RUN_TERMINAL",
"message": "the run already finished (COMPLETE)"
}
]
}
{
"data": null,
"errors": [
{
"error": "TRANSLATION_RUN_NOT_FOUND",
"message": "no translation run with that id"
}
]
}
Docs for agents: llms.txt
Was this page helpful?