REST API
API Reference
Full documentation for the NewsPro REST API. Manage content, media, and users programmatically.
Articles
Available Fields
| Field | Type | Description |
|---|---|---|
id | int | Article ID |
title | string | Article headline |
slug | string | URL slug (auto-generated from title if empty) |
subtitle | string | Short description shown below the title |
body | string | Full article content (HTML, supports dynamic blocks) |
keywords | string | Comma-separated keywords for SEO and search |
category_id | int | Category ID |
user_id | int | Author user ID |
created_at | datetime | Publication date (YYYY-MM-DD HH:MM:SS) |
updated_at | datetime | Last update date |
total_views | int | View count |
approved | int | 1 = approved, 0 = pending review |
status | int | 1 = Private, 2 = Registered users only, 3 = Public |
thumbnail | int | Media file ID for the thumbnail image |
video_link | int | Media file ID of a video file |
audio_tts_id | int | Media file ID of an audio/TTS file |
sponsored | int | 1 = sponsored content, 0 = regular |
likes | int | Like count |
anonymous | int | 1 = hide author identity |
Get Articles
{"resource":"article","action":"get","filters":{"category_id":2,"status":3,"approved":1,"date_from":"2025-01-01","date_to":"2025-12-31","search":"keyword"},"fields":["id","title","slug","category_id","created_at"],"limit":20,"offset":0,"order_by":"created_at DESC"}
Get Single Article
{"resource":"article","action":"get","id":18}
Add Article
{"resource":"article","action":"add","title":"Article Title","subtitle":"Subtitle text","body":"<p>Article content HTML...</p>","keywords":"news, article","created_at":"2025-01-15 10:00:00","category_id":2,"user_id":1,"approved":1,"status":3,"thumbnail":15,"comments":1,"sponsored":0,"anonymous":0}
Edit Article
All fields are optional except id. Only fields included in the request are updated.
{"resource":"article","action":"edit","id":595,"title":"Updated Title","subtitle":"Updated subtitle","body":"<p>Updated content</p>","category_id":2,"approved":1,"status":3}
Delete Article
{"resource":"article","action":"delete","id":608}
Copied to clipboard!