Skip to main content

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

ParameterTypeDescription
idintegerThe post ID

Request Body

All fields are optional — only include the fields you want to update.

ParameterTypeDescription
titlestringPost title
descriptionstringPost body (supports rich text / HTML)
typestringContent type: "article", "video", "link"
videostringVideo URL
contentURIstringExternal link URL
featuredImagestringFeatured image path/URL
durationintegerVideo duration in seconds
isLiveStreambooleanWhether this post is a live stream
streamIdstringLive stream identifier
ctaBtnTextstringCall-to-action button text
ctaBtnUrlstringCall-to-action button URL
publishedDatestringISO date for scheduling

Response

Success Response

Status Code: 200 OK

Returns the updated post object with associations.

Error Responses

Status CodeDescription
400Invalid post ID
403Not authorised to update this post
404Post not found

Notes

  • A WebSocket postUpdated event 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" }'