REST API
API Reference
Full documentation for the NewsPro REST API. Manage content, media, and users programmatically.
Pages
Available Fields
| Field | Type | Description |
|---|---|---|
id | int | Page ID |
title | string | Page title |
slug | string | URL path (e.g. /page/about-us) |
description | string | SEO meta description |
content | string | Full page HTML content (supports dynamic blocks) |
thumbnail | int | Media file ID for page cover image |
status | int | 1 = published/visible, 0 = hidden |
total_views | int | View count |
created_at | datetime | Creation date |
Get Pages
{"resource":"page","action":"get","filters":{"status":1,"search":"about"},"fields":["id","title","slug","status","created_at"],"limit":20}
Get Single Page
{"resource":"page","action":"get","id":1}
Add Page
{"resource":"page","action":"add","title":"About Us","slug":"about-us","description":"Learn more about our editorial team","content":"<h2>Who We Are</h2><p>Body HTML...</p>","status":1,"thumbnail":20}
Edit Page
All fields are optional except id. The default homepage (ID 1) cannot be edited or deleted via API.
{"resource":"page","action":"edit","id":5,"title":"About Us - Updated","description":"Updated SEO description","content":"<h2>Updated</h2><p>...</p>","status":1}
Delete Page
{"resource":"page","action":"delete","id":5}
Copied to clipboard!