Endpoints
Cancel One Platform Job
Stop one queued or retrying platform job without removing completed posts from the same batch.
POST
/
api
/
v1
/
jobs
/
{id}
/
cancel
Cancel one queued platform job
curl --request POST \
--url https://mallary.ai/api/v1/jobs/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://mallary.ai/api/v1/jobs/{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://mallary.ai/api/v1/jobs/{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://mallary.ai/api/v1/jobs/{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://mallary.ai/api/v1/jobs/{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://mallary.ai/api/v1/jobs/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mallary.ai/api/v1/jobs/{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{
"status": "ok",
"data": {
"job_id": 123,
"batch_id": "<string>",
"platform": "twitter",
"previous_status": "<string>",
"status": "cancelled",
"completed_job_ids_preserved": [
123
]
}
}Use this endpoint when one destination in a multi-platform post is still queued or retrying but other destinations have already published.
For example, if Instagram and TikTok completed but YouTube is waiting to retry, cancel the YouTube job ID to stop only that upload. The completed Instagram and TikTok posts stay unchanged.
A failed job is already terminal and cannot be cancelled. Use
GET /api/v1/jobs/{id} to read its saved failure. To delete an entire grouped post before any destination starts publishing, use DELETE /api/v1/posts/{id}.Authorizations
Use Authorization: Bearer {api_key}
Path Parameters
Job ID returned by POST /api/v1/post.
Last modified on October 16, 2026
Was this page helpful?
Cancel one queued platform job
curl --request POST \
--url https://mallary.ai/api/v1/jobs/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://mallary.ai/api/v1/jobs/{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://mallary.ai/api/v1/jobs/{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://mallary.ai/api/v1/jobs/{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://mallary.ai/api/v1/jobs/{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://mallary.ai/api/v1/jobs/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mallary.ai/api/v1/jobs/{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{
"status": "ok",
"data": {
"job_id": 123,
"batch_id": "<string>",
"platform": "twitter",
"previous_status": "<string>",
"status": "cancelled",
"completed_job_ids_preserved": [
123
]
}
}
