Unpublish deletes a post from the network it went to, so it disappears there too. It works on posts Reelspan published and on posts made outside Reelspan, as long as the profile's connected account may delete them.
Deleting can't be undone, except on WordPress, where the post goes to the site's trash.
Delete a post Reelspan published
Name the post by the request_id you got when you posted, and the platform to delete it from:
curl -X POST https://api.reelspan.com/v1/posts/unpublish \
-H "Authorization: Bearer $REELSPAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"request_id": "9b1f6c2e8a3d4f50b7e1c9a2d6f3e8b1", "platform": "linkedin"}'import { Reelspan } from 'reelspan';
const reelspan = new Reelspan();
await reelspan.request('POST', '/v1/posts/unpublish', {
json: { request_id: '9b1f6c2e8a3d4f50b7e1c9a2d6f3e8b1', platform: 'linkedin' },
});from reelspan import Reelspan
reelspan = Reelspan()
reelspan.request("POST", "/v1/posts/unpublish", json_body={
"request_id": "9b1f6c2e8a3d4f50b7e1c9a2d6f3e8b1",
"platform": "linkedin",
}){ "success": true, "platform": "linkedin", "post_id": "urn:li:share:72…", "message": "Deleted from LinkedIn" }platform can be left out when the request went live on one network only. When it went live on several, the answer without it is 400 PLATFORM_REQUIRED, naming them. Each call deletes one network's post: to remove a post everywhere, call once per network.
For a post Reelspan published, the network's result in Post status then carries unpublished: true and unpublished_at.
Delete any post of the account
For a post made outside Reelspan, or when you only have the network's id, send platform, the profile in user, and the network's post_id:
curl -X POST https://api.reelspan.com/v1/posts/unpublish \
-H "Authorization: Bearer $REELSPAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"platform": "x", "user": "my-brand", "post_id": "1854123456789012345"}'await reelspan.request('POST', '/v1/posts/unpublish', {
json: { platform: 'x', user: 'my-brand', post_id: '1854123456789012345' },
});reelspan.request("POST", "/v1/posts/unpublish", json_body={"platform": "x", "user": "my-brand", "post_id": "1854123456789012345"})profile_username works in place of user. The post_id is the one each network uses, the same as post_id in a post's results.
Which networks
| Network | post_id |
Notes |
|---|---|---|
| The post, Reel or video id | Page posts. The Page is found from the post id, or the chosen Page is used. | |
The post URN (urn:li:share:…) |
A post already gone counts as deleted. | |
| X | The post id | |
| The Pin id | A Pin already gone counts as deleted. | |
| Bluesky | The at:// URI, or a bsky.app/profile/…/post/… link |
Only the connected account's own posts (post_not_owned otherwise). |
| Google Business | The post's full name, accounts/…/locations/…/localPosts/… |
A post already gone counts as deleted. |
| Discord | The message id | Only messages the connected webhook sent. A message already gone counts as deleted. |
| Telegram | The message id | Telegram lets bots delete messages for 48 hours after sending. |
| Mastodon | The status id | |
| WordPress | The post id | Moved to the site's trash, where it can be restored for 30 days. |
Instagram, TikTok, Threads and YouTube posts can't be deleted through Reelspan: the first three have no delete in their APIs (Threads needs a permission Reelspan doesn't hold), and deleting a YouTube video needs a wider permission than the upload access Reelspan asks for. Asking for one of them gets 400 platform_not_supported, with the networks that work in supported_platforms.
Errors
| Status | error_code |
Why |
|---|---|---|
400 |
INVALID_REQUEST |
Neither request_id, nor platform with post_id, was sent. |
400 |
PLATFORM_REQUIRED |
The request went live on several networks; send platform. |
400 |
platform_not_supported |
The network can't delete posts through its API. supported_platforms lists the ones that can. |
400 |
invalid_post_id |
The post_id isn't in the network's shape (Bluesky and Google Business check it). |
400 |
post_not_owned |
Bluesky: the post belongs to another account. |
404 |
NOT_FOUND |
No request with that request_id (or your key can't use its profile). |
404 |
POST_NOT_FOUND |
The request has no live post on that network, or the network says the post doesn't exist. |
404 |
profile_platform_mapping_invalid |
The profile has no account on that network, or the account that published the post was disconnected. |
409 |
reauth_required |
The account must be reconnected first. |
502 |
the network's code | The network refused; error_code (such as x_error or meta_error) and message say why, and retryable says whether trying again may help. |
Unpublishing needs a key with the publish scope. To change a post instead of deleting it, see Edit a post.