Cancel Agent Run
import requests
url = "https://platform.ankra.app/api/v1/org/ai-agent-runs/{run_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://platform.ankra.app/api/v1/org/ai-agent-runs/{run_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/ai-agent-runs/{run_id}/cancel \
--header 'Authorization: Bearer <token>'{
"cancelled_session_id": "<string>",
"detail": "<string>",
"status": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}AI Agent Runs
Cancel Agent Run
Cancel one live AI agent run and its session (organisation admins only). The runner interrupts the in-flight turn within seconds.
POST
/
api
/
v1
/
org
/
ai-agent-runs
/
{run_id}
/
cancel
Cancel Agent Run
import requests
url = "https://platform.ankra.app/api/v1/org/ai-agent-runs/{run_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://platform.ankra.app/api/v1/org/ai-agent-runs/{run_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/ai-agent-runs/{run_id}/cancel \
--header 'Authorization: Bearer <token>'{
"cancelled_session_id": "<string>",
"detail": "<string>",
"status": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.