curl \
-H "Authorization: Bearer API Key" \
-H 'Content-Type: application/json' \
-d '{"id": "Post ID"}' \
-X DELETE https://api.ayrshare.com/api/post
const API_KEY = "API_KEY";
const id = "Post ID";
fetch("https://api.ayrshare.com/api/post", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({ id }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'id': 'Post ID'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.delete('https://api.ayrshare.com/api/post',
json=payload,
headers=headers)
print(r.json())
<?php
$apiUrl = 'https://api.ayrshare.com/api/post';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$postId = '7NFVK0QIXET5rCUS9tmf'; // Replace with your actual post ID
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$data = json_encode(['id' => $postId]);
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $data
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace DeletePOSTRequest_csharp
{
class Delete
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/post";
// Set up request headers
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
// Prepare JSON content
string json = "{\"id\" : \"Post ID\"}";
var content = new StringContent(json, Encoding.UTF8, "application/json");
try
{
// Create and send DELETE request with content
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri(url),
Content = content
};
HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
// Read response
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
{
"twitter": {
"action": "delete",
"status": "success",
"id": "1288900099663775749" // Twitter Social Post ID
},
"facebook": {
"action": "delete",
"status": "success",
"id": "104920007983682_108683297607743" // Facebook Social PostID
},
"status": "success"
}
{
"status": "success",
"id": "p8Ee6xDPx8PRxsjtDXf3" // Ayrshare Post ID
}
{
"action": "delete",
"status": "error",
"code": 114,
"message": "Delete id not found.",
"id": "IdpUOyihLEpIx0d0N9mI" // Ayrshare Post ID used for delete, comment, analytics, etc.
}
{
"action": "delete",
"status": "error",
"code": 383,
"message": "The post is already deleted.",
"id": "p8Ee6xDPx8PRxsjtDXf3" // Ayrshare Post ID
}
{
"action": "delete",
"status": "error",
"code": 382,
"message": "The post was not manually deleted at the social network. By using the markManualDeleted option, you are responsible for deleting the post at the social network. Please delete the post and try again.",
"id": "DD3fA2DC4qe2T48hSdgs",
"markManualDeleted": true
}
Post
पोस्ट हटाएँ
पोस्ट ID का उपयोग करके एक पोस्ट हटाएँ
DELETE
/
post
curl \
-H "Authorization: Bearer API Key" \
-H 'Content-Type: application/json' \
-d '{"id": "Post ID"}' \
-X DELETE https://api.ayrshare.com/api/post
const API_KEY = "API_KEY";
const id = "Post ID";
fetch("https://api.ayrshare.com/api/post", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({ id }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'id': 'Post ID'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.delete('https://api.ayrshare.com/api/post',
json=payload,
headers=headers)
print(r.json())
<?php
$apiUrl = 'https://api.ayrshare.com/api/post';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$postId = '7NFVK0QIXET5rCUS9tmf'; // Replace with your actual post ID
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$data = json_encode(['id' => $postId]);
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $data
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace DeletePOSTRequest_csharp
{
class Delete
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/post";
// Set up request headers
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
// Prepare JSON content
string json = "{\"id\" : \"Post ID\"}";
var content = new StringContent(json, Encoding.UTF8, "application/json");
try
{
// Create and send DELETE request with content
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri(url),
Content = content
};
HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
// Read response
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
{
"twitter": {
"action": "delete",
"status": "success",
"id": "1288900099663775749" // Twitter Social Post ID
},
"facebook": {
"action": "delete",
"status": "success",
"id": "104920007983682_108683297607743" // Facebook Social PostID
},
"status": "success"
}
{
"status": "success",
"id": "p8Ee6xDPx8PRxsjtDXf3" // Ayrshare Post ID
}
{
"action": "delete",
"status": "error",
"code": 114,
"message": "Delete id not found.",
"id": "IdpUOyihLEpIx0d0N9mI" // Ayrshare Post ID used for delete, comment, analytics, etc.
}
{
"action": "delete",
"status": "error",
"code": 383,
"message": "The post is already deleted.",
"id": "p8Ee6xDPx8PRxsjtDXf3" // Ayrshare Post ID
}
{
"action": "delete",
"status": "error",
"code": 382,
"message": "The post was not manually deleted at the social network. By using the markManualDeleted option, you are responsible for deleting the post at the social network. Please delete the post and try again.",
"id": "DD3fA2DC4qe2T48hSdgs",
"markManualDeleted": true
}
/post एंडपॉइंट से लौटाई गई पोस्ट ID का उपयोग करके एक पोस्ट हटाएँ।
आप प्रकाशित और शेड्यूल की गई दोनों पोस्ट हटा सकते हैं, लेकिन सोशल नेटवर्क
platform के आधार पर कुछ अंतर हैं:
- सभी सोशल नेटवर्क
platformsके लिए शेड्यूल की गई पोस्ट हटाई जा सकती हैं। - Instagram और TikTok को छोड़कर सभी सोशल नेटवर्क
platformsके लिए प्रकाशित पोस्ट हटाई जा सकती हैं। Instagram और TikTok प्रकाशित पोस्ट हटाने के लिए API सपोर्ट प्रदान नहीं करते हैं। यदि आपको इन प्लेटफ़ॉर्म पर एक प्रकाशित पोस्ट हटाने की आवश्यकता है, तो आपको संबंधित मोबाइल ऐप का उपयोग करके मैन्युअल रूप से ऐसा करना होगा। - Facebook अपने API के माध्यम से इमेज स्टोरीज़ को हटाने की अनुमति नहीं देता है (वीडियो स्टोरीज़ हटाई जा सकती हैं)। यदि आपको इमेज स्टोरी हटाने की आवश्यकता है, तो कृपया Facebook मोबाइल ऐप पर जाकर मैन्युअल रूप से हटाएँ।
Instagram और TikTok अपने API के माध्यम से हटाने का समर्थन नहीं करते हैं। पोस्ट हटाने के लिए
कृपया Instagram या TikTok मोबाइल ऐप पर जाएँ।Facebook अपने API के माध्यम से इमेज स्टोरी हटाने का समर्थन नहीं करता है। स्टोरीज़ हटाने के लिए
कृपया Facebook मोबाइल ऐप पर जाएँ।
Header Parameters
Body Parameters
string
आवश्यक
हटाने के लिए पोस्ट की Ayrshare Post ID।यदि
bulk या deleteAllScheduled पैरामीटर भेजा गया है तो आवश्यक नहीं है।यदि पोस्ट शेड्यूल की गई है और अभी भी pending है, तो शेड्यूल की गई पोस्ट हटा दी जाएगी और नेटवर्क पर नहीं भेजी जाएगी।यदि पोस्ट पहले से ही नेटवर्क पर भेज दी गई है, तो पोस्ट नेटवर्क से हटा दी जाएगी।array
बल्क में हटाने के लिए String पोस्ट Ids का Array।यदि
id या deleteAllScheduled पैरामीटर नहीं भेजा गया है तो आवश्यक है।boolean
डिफ़ॉल्ट:false
यदि
true है तो User Profile के लिए अभी भी pending स्थिति में सभी शेड्यूल की गई पोस्ट, यानी वे पोस्ट जो अभी तक नेटवर्क पर प्रकाशित नहीं हुई हैं, को हटा देगा।यदि true पर सेट किया जाता है तो id या bulk पैरामीटर को अनदेखा कर दिया जाता है।यह सभी शेड्यूल की गई पोस्ट को हटा देगा, इसलिए इसे सावधानी से उपयोग करना सुनिश्चित करें।
boolean
डिफ़ॉल्ट:false
यदि
true है, तो पोस्ट को Ayrshare में हटाए गए के रूप में चिह्नित कर दिया जाएगा और Ayrshare नेटवर्क पर पोस्ट हटाने का प्रयास नहीं करेगा।इसका एक सामान्य उपयोग-मामला यह है कि जब पोस्ट को नेटवर्क पर मैन्युअल रूप से हटा दिया गया हो और आप उसे Ayrshare में हटाए गए के रूप में चिह्नित करना चाहते हों।पोस्ट को हटाए गए के रूप में चिह्नित करने से पहले, कृपया सुनिश्चित करें कि पोस्ट को सोशल नेटवर्क पर पहले से ही मैन्युअल रूप से हटा दिया गया है।curl \
-H "Authorization: Bearer API Key" \
-H 'Content-Type: application/json' \
-d '{"id": "Post ID"}' \
-X DELETE https://api.ayrshare.com/api/post
const API_KEY = "API_KEY";
const id = "Post ID";
fetch("https://api.ayrshare.com/api/post", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({ id }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'id': 'Post ID'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.delete('https://api.ayrshare.com/api/post',
json=payload,
headers=headers)
print(r.json())
<?php
$apiUrl = 'https://api.ayrshare.com/api/post';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$postId = '7NFVK0QIXET5rCUS9tmf'; // Replace with your actual post ID
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$data = json_encode(['id' => $postId]);
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $data
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace DeletePOSTRequest_csharp
{
class Delete
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/post";
// Set up request headers
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
// Prepare JSON content
string json = "{\"id\" : \"Post ID\"}";
var content = new StringContent(json, Encoding.UTF8, "application/json");
try
{
// Create and send DELETE request with content
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri(url),
Content = content
};
HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
// Read response
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
{
"twitter": {
"action": "delete",
"status": "success",
"id": "1288900099663775749" // Twitter Social Post ID
},
"facebook": {
"action": "delete",
"status": "success",
"id": "104920007983682_108683297607743" // Facebook Social PostID
},
"status": "success"
}
{
"status": "success",
"id": "p8Ee6xDPx8PRxsjtDXf3" // Ayrshare Post ID
}
{
"action": "delete",
"status": "error",
"code": 114,
"message": "Delete id not found.",
"id": "IdpUOyihLEpIx0d0N9mI" // Ayrshare Post ID used for delete, comment, analytics, etc.
}
{
"action": "delete",
"status": "error",
"code": 383,
"message": "The post is already deleted.",
"id": "p8Ee6xDPx8PRxsjtDXf3" // Ayrshare Post ID
}
{
"action": "delete",
"status": "error",
"code": 382,
"message": "The post was not manually deleted at the social network. By using the markManualDeleted option, you are responsible for deleting the post at the social network. Please delete the post and try again.",
"id": "DD3fA2DC4qe2T48hSdgs",
"markManualDeleted": true
}