Skip to main content
POST
/
v1
/
tasks
/
{task_id}
/
cancel
Cancel Task
curl --request POST \
  --url https://api.mindfort.app/v1/tasks/{task_id}/cancel \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.mindfort.app/v1/tasks/{task_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.mindfort.app/v1/tasks/{task_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.mindfort.app/v1/tasks/{task_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))

}
{
  "task_id": "<string>",
  "status": "<string>"
}
{
"task_id": "<string>",
"status": "<string>"
}
{
"error": "<string>",
"request_id": "<string>"
}
{
"error": "<string>",
"request_id": "<string>"
}
{
"error": "<string>",
"request_id": "<string>"
}

Authorizations

Authorization
string
header
required

API key generated from the MindFort dashboard. Pass as Authorization: Bearer <your-api-key>.

Path Parameters

task_id
string
required

Scoped task ID returned by the task start endpoint, in the form org_id::task_uuid

Response

Task cancelled successfully

task_id
string

Scoped task ID in the form org_id::task_uuid

status
string

Cancellation status