Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X DELETE "https://postsyncer.com/api/v1/snippets/31" \ -H "Authorization: Bearer YOUR_API_TOKEN"
{ "message": "Snippet deleted successfully" }
Delete a saved snippet or hashtag group
const axios = require('axios'); const deleteSnippet = async (snippetId) => { try { const response = await axios.delete(`https://postsyncer.com/api/v1/snippets/${snippetId}`, { headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' } }); console.log(response.data.message); } catch (error) { console.error('Error deleting snippet:', error.response?.data || error.message); } }; deleteSnippet(31);
<?php $snippetId = 31; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://postsyncer.com/api/v1/snippets/{$snippetId}"); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_TOKEN' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($httpCode === 200) { $result = json_decode($response, true); echo $result['message']; } else { echo "Error: " . $response; } ?>
import requests snippet_id = 31 headers = { 'Authorization': 'Bearer YOUR_API_TOKEN' } response = requests.delete( f'https://postsyncer.com/api/v1/snippets/{snippet_id}', headers=headers ) if response.status_code == 200: print(response.json()['message']) else: print(f"Error: {response.status_code}") print(response.text)
snippets:delete
Was this page helpful?