Edit, delete, and cancel posts
Update draft content, remove drafts permanently, or cancel scheduled posts that have not yet published.
PATCH /api/v1/posts/:id updates a post. Only editable fields are content and social_account_ids. Scheduled posts can be edited as long as they have not yet published; the worker reads the latest state at publish time.
curl -X PATCH "$SOCIALSPOOL_BASE_URL/api/v1/posts/post_01HZ..." \
-H "Authorization: Bearer $SOCIALSPOOL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "Updated content for this post"}'Restrictions by post status:
draft:contentandsocial_account_idsare editable.scheduled:contentandsocial_account_idsare editable. The worker reads latest state at publish time.publishing,published,failed,canceled: not editable.
DELETE /api/v1/posts/:id permanently removes a draft post. Only posts with draft status can be deleted. Scheduled or published posts must be canceled first.
curl -X DELETE "$SOCIALSPOOL_BASE_URL/api/v1/posts/post_01HZ..." \
-H "Authorization: Bearer $SOCIALSPOOL_API_KEY"A successful delete returns 204 No Content.
POST /api/v1/posts/:id/cancel cancels a scheduled post before the worker publishes it. The cancel route removes pending pg-boss jobs and marks all targets as canceled. If a target is already published, it remains published.
curl -X POST "$SOCIALSPOOL_BASE_URL/api/v1/posts/post_01HZ.../cancel" \
-H "Authorization: Bearer $SOCIALSPOOL_API_KEY"Cancel conditions:
- The post must have at least one target with
scheduledorpublishingstatus. - Already-published targets are unaffected.
- Canceled posts cannot be rescheduled. Create a new post instead.