Delete Post
Delete a post. Only the post creator, a group admin of the post's group, or a platform admin can delete a post.
Endpoint
DELETE /api/posts/:id
Authentication
Required. Must be the post creator, a group admin, or a platform admin.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | The post ID |
Response
Success Response
Status Code: 200 OK
{
"success": true,
"message": "Post deleted successfully"
}
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid post ID |
| 403 | Not authorised to delete this post |
| 404 | Post not found |
Notes
- A WebSocket
postDeletedevent is broadcast to the group.
Example
curl -X DELETE "https://api.tribesocial.io/api/posts/4212" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"