Publishing
Cancel a post
Cancel a post that hasn’t gone out yet. A published post stays on the platform: delete it there.
POST
/
posts
/
{post_id}
/
cancel
Cancel a post
curl --request POST \
--url https://api.vidjutsu.ai/posts/{post_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vidjutsu.ai/posts/{post_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.vidjutsu.ai/posts/{post_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.vidjutsu.ai/posts/{post_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.vidjutsu.ai/posts/{post_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.vidjutsu.ai/posts/{post_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vidjutsu.ai/posts/{post_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{
"post": {
"id": "<string>",
"media": {
"hash": "<string>",
"type": "video",
"source": {}
},
"targets": [
{
"social_account_id": "<string>",
"platform": "tiktok",
"options": {
"privacy_level": "<string>",
"allow_comment": true,
"allow_duet": true,
"allow_stitch": true,
"ai_generated": true,
"commercial_content": "none",
"title": "<string>",
"visibility": "public",
"tags": [
"<string>"
]
},
"state": "pending",
"url": "<string>",
"error": "<unknown>"
}
],
"state": "pending_approval",
"caption": "<string>",
"scheduled_for": 123,
"created_at": "<unknown>",
"published_at": "<unknown>"
}
}{
"code": "unauthenticated",
"message": "<string>",
"request_id": "<string>",
"reason": "<string>",
"checkout_url": "<string>",
"top_up_url": "<string>",
"upgrade_url": "<string>",
"media_deletes_at": "2023-11-07T05:31:56Z",
"contact_url": "<string>",
"retry_after_seconds": 123,
"latest_version": "<string>"
}{
"code": "unauthenticated",
"message": "<string>",
"request_id": "<string>",
"reason": "<string>",
"checkout_url": "<string>",
"top_up_url": "<string>",
"upgrade_url": "<string>",
"media_deletes_at": "2023-11-07T05:31:56Z",
"contact_url": "<string>",
"retry_after_seconds": 123,
"latest_version": "<string>"
}{
"code": "unauthenticated",
"message": "<string>",
"request_id": "<string>",
"reason": "<string>",
"checkout_url": "<string>",
"top_up_url": "<string>",
"upgrade_url": "<string>",
"media_deletes_at": "2023-11-07T05:31:56Z",
"contact_url": "<string>",
"retry_after_seconds": 123,
"latest_version": "<string>"
}Authorizations
Headers
The API version you wrote your integration against, a date. Without it you get the latest version. The current version is 2026-11-03. See https://docs.vidjutsu.ai/api-reference/introduction#versioning.
Pattern:
^\d{4}-\d{2}-\d{2}$Example:
"2026-11-03"
Cancel a post
curl --request POST \
--url https://api.vidjutsu.ai/posts/{post_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vidjutsu.ai/posts/{post_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.vidjutsu.ai/posts/{post_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.vidjutsu.ai/posts/{post_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.vidjutsu.ai/posts/{post_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.vidjutsu.ai/posts/{post_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vidjutsu.ai/posts/{post_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{
"post": {
"id": "<string>",
"media": {
"hash": "<string>",
"type": "video",
"source": {}
},
"targets": [
{
"social_account_id": "<string>",
"platform": "tiktok",
"options": {
"privacy_level": "<string>",
"allow_comment": true,
"allow_duet": true,
"allow_stitch": true,
"ai_generated": true,
"commercial_content": "none",
"title": "<string>",
"visibility": "public",
"tags": [
"<string>"
]
},
"state": "pending",
"url": "<string>",
"error": "<unknown>"
}
],
"state": "pending_approval",
"caption": "<string>",
"scheduled_for": 123,
"created_at": "<unknown>",
"published_at": "<unknown>"
}
}{
"code": "unauthenticated",
"message": "<string>",
"request_id": "<string>",
"reason": "<string>",
"checkout_url": "<string>",
"top_up_url": "<string>",
"upgrade_url": "<string>",
"media_deletes_at": "2023-11-07T05:31:56Z",
"contact_url": "<string>",
"retry_after_seconds": 123,
"latest_version": "<string>"
}{
"code": "unauthenticated",
"message": "<string>",
"request_id": "<string>",
"reason": "<string>",
"checkout_url": "<string>",
"top_up_url": "<string>",
"upgrade_url": "<string>",
"media_deletes_at": "2023-11-07T05:31:56Z",
"contact_url": "<string>",
"retry_after_seconds": 123,
"latest_version": "<string>"
}{
"code": "unauthenticated",
"message": "<string>",
"request_id": "<string>",
"reason": "<string>",
"checkout_url": "<string>",
"top_up_url": "<string>",
"upgrade_url": "<string>",
"media_deletes_at": "2023-11-07T05:31:56Z",
"contact_url": "<string>",
"retry_after_seconds": 123,
"latest_version": "<string>"
}