Update Post
Update an existing post. Only the post creator, a group admin of the post's group, or a platform admin can update a post.
Endpoint
PUT /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 |
Request Body
All fields are optional — only include the fields you want to update.
| Parameter | Type | Description |
|---|---|---|
title | string | Post title |
description | string | Post body (supports rich text / HTML) |
type | string | Content type: "article", "video", "link" |
video | string | Video URL |
contentURI | string | External link URL |
featuredImage | string | Featured image path/URL |
duration | integer | Video duration in seconds |
isLiveStream | boolean | Whether this post is a live stream |
streamId | string | Live stream identifier |
ctaBtnText | string | Call-to-action button text |
ctaBtnUrl | string | Call-to-action button URL |
publishedDate | string | ISO date for scheduling |
Response
Success Response
Status Code: 200 OK
Returns the updated post object with associations.
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid post ID |
| 403 | Not authorised to update this post |
| 404 | Post not found |
Notes
- A WebSocket
postUpdatedevent is broadcast to the group. - If a new raw video file is set on a video post, the transcoding status is reset so the video will be re-queued for processing.
Example
curl -X PUT "https://api.tribesocial.io/api/posts/4212" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-d '{ "title": "Updated title" }'