Delete or cancel a post
curl --request DELETE \
--url https://api.social-api.ai/v1/posts/{pid} \
--header 'Authorization: <api-key>'const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/posts/{pid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/posts/{pid}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text){
"deleted": true,
"results": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"message": "Operation not supported for this platform",
"outcome": "not_supported",
"platform": "tiktok"
}
],
"success": true
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Posts
Delete or cancel a post
Deletes a draft/scheduled/failed post locally, or deletes a published post from every platform that supports it. Platforms that do not support deletion (or fail) keep their copy live and the post is kept rather than removed. Returns a per-platform result.
DELETE
/
posts
/
{pid}
Delete or cancel a post
curl --request DELETE \
--url https://api.social-api.ai/v1/posts/{pid} \
--header 'Authorization: <api-key>'const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/posts/{pid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/posts/{pid}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text){
"deleted": true,
"results": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"message": "Operation not supported for this platform",
"outcome": "not_supported",
"platform": "tiktok"
}
],
"success": true
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}