Skip to main content

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:

FieldTypeDescription
titlestringArticle title
contentstringHTML content
excerptstringShort preview text
coverImageUrlstringFeatured image URL
membersOnlybooleanRestrict to org members
tagsstring[]Tag labels
scheduledAtdatetimeSchedule for future publish (ISO 8601)

List Articles

GET /api/orgs/{organizationId}/news
Authorization: Bearer <token>

Query Parameters:

ParamTypeDescription
statusstringDRAFT, PUBLISHED, ARCHIVED
membersOnlybooleanFilter members-only articles
tagstringFilter by tag
searchstringSearch by title
pageintPage number
sizeintPage 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>