curl -X DELETE "https://api.infinipost.co/v1/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"postIds": ["post_abc123", "post_def456"]
}'
const response = await fetch('https://api.infinipost.co/v1/posts', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
postIds: ['post_abc123', 'post_def456']
})
});
const data = await response.json();
{
"deleted": ["post_abc123", "post_def456"],
"failed": [],
"deletedAt": "2024-04-21T20:20:00Z"
}
{
"deleted": ["post_abc123"],
"failed": [
{
"postId": "post_def456",
"reason": "already_posted"
}
],
"deletedAt": "2024-04-21T20:20:00Z"
}
Posts
Delete Post
Delete one or more scheduled posts
DELETE
/
v1
/
posts
curl -X DELETE "https://api.infinipost.co/v1/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"postIds": ["post_abc123", "post_def456"]
}'
const response = await fetch('https://api.infinipost.co/v1/posts', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
postIds: ['post_abc123', 'post_def456']
})
});
const data = await response.json();
{
"deleted": ["post_abc123", "post_def456"],
"failed": [],
"deletedAt": "2024-04-21T20:20:00Z"
}
{
"deleted": ["post_abc123"],
"failed": [
{
"postId": "post_def456",
"reason": "already_posted"
}
],
"deletedAt": "2024-04-21T20:20:00Z"
}
Only posts with a status of
generated or pending_render can be deleted. Posts that have already been posted cannot be deleted.Request Body
array
required
Array of post IDs to delete. You can delete a single post or multiple posts in one request.
Response
array
Array of post IDs that were successfully deleted.
array
string
ISO 8601 timestamp of when the deletion was processed.
curl -X DELETE "https://api.infinipost.co/v1/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"postIds": ["post_abc123", "post_def456"]
}'
const response = await fetch('https://api.infinipost.co/v1/posts', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
postIds: ['post_abc123', 'post_def456']
})
});
const data = await response.json();
{
"deleted": ["post_abc123", "post_def456"],
"failed": [],
"deletedAt": "2024-04-21T20:20:00Z"
}
{
"deleted": ["post_abc123"],
"failed": [
{
"postId": "post_def456",
"reason": "already_posted"
}
],
"deletedAt": "2024-04-21T20:20:00Z"
}
Error Responses
Unauthorized
{
"error": {
"code": "unauthenticated",
"message": "Invalid or missing API key"
}
}
Missing Required Fields
{
"error": {
"code": "missing_required_fields",
"message": "postIds is required and must be a non-empty array"
}
}
Server Error
{
"error": {
"code": "internal",
"message": "An unexpected error occurred"
}
}