News API
Base path: /api/orgs/{organizationId}/news
All endpoints require Authorization: Bearer <token>.
Articles
Create Article
POST /api/orgs/{organizationId}/news
Authorization: Bearer <adminToken>
{
"title": "Welcome to Our New Platform",
"content": "<p>We are excited to announce...</p>",
"excerpt": "A short summary for previews.",
"coverImageUrl": "https://storage.example.com/cover.jpg",
"membersOnly": false,
"tags": ["announcement", "platform"],
"scheduledAt": null
}
Fields:
| Field | Type | Description |
|---|---|---|
title | string | Article title |
content | string | HTML content |
excerpt | string | Short preview text |
coverImageUrl | string | Featured image URL |
membersOnly | boolean | Restrict to org members |
tags | string[] | Tag labels |
scheduledAt | datetime | Schedule for future publish (ISO 8601) |
List Articles
GET /api/orgs/{organizationId}/news
Authorization: Bearer <token>
Query Parameters:
| Param | Type | Description |
|---|---|---|
status | string | DRAFT, PUBLISHED, ARCHIVED |
membersOnly | boolean | Filter members-only articles |
tag | string | Filter by tag |
search | string | Search by title |
page | int | Page number |
size | int | Page size |
Get Article
GET /api/orgs/{organizationId}/news/{articleId}
Authorization: Bearer <token>
View count is incremented on each fetch for published articles.
Update Article
PUT /api/orgs/{organizationId}/news/{articleId}
Authorization: Bearer <adminToken>
Delete Article
DELETE /api/orgs/{organizationId}/news/{articleId}
Authorization: Bearer <adminToken>
Soft-deletes the article (sets deleted_at).
Publish Article
POST /api/orgs/{organizationId}/news/{articleId}/publish
Authorization: Bearer <adminToken>
Transitions from DRAFT to PUBLISHED. If scheduledAt is set, the article becomes visible at that time instead of immediately.
Comments
Add Comment
POST /api/orgs/{organizationId}/news/{articleId}/comments
Authorization: Bearer <token>
{
"content": "Great update, thanks for sharing!",
"parentCommentId": null
}
Set parentCommentId to reply to an existing comment (threaded).
List Comments
GET /api/orgs/{organizationId}/news/{articleId}/comments
Authorization: Bearer <token>
Returns a threaded comment tree.
Delete Comment
DELETE /api/orgs/{organizationId}/news/{articleId}/comments/{commentId}
Authorization: Bearer <adminToken>