🎉 NewsPro 3.0 Launch Discount — use code NEWSPRO3LAUNCH for 20% OFF · ends May 31 View plans →

API Reference

Full documentation for the NewsPro REST API. Manage content, media, and users programmatically.

Categories

Available Fields

FieldTypeDescription
idintCategory ID
titlestringCategory name
slugstringURL slug (auto-generated if empty)
descriptionstringShort description of the category
colorstringHex color for the category label/badge (e.g. #FF5733)
parent_idintParent category ID (0 = top-level)
category_topint1 = show in top navigation bar
top_menu_positionintSort order in top navigation (lower = first)
statusint1 = Private, 2 = Registered only, 3 = Public
total_viewsintView count
created_atdatetimeCreation date

Get Categories

{"resource":"category","action":"get","filters":{"parent_id":0,"status":3},"fields":["id","title","slug","color","category_top"],"limit":50,"order_by":"top_menu_position ASC"}

Get Single Category

{"resource":"category","action":"get","id":2}

Add Category

{"resource":"category","action":"add","title":"Technology","slug":"technology","color":"#FF5733","description":"Tech news and updates","category_top":1,"top_menu_position":5,"user_id":1,"parent_id":0,"approved":1,"status":3}

Edit Category

All fields are optional except id.

{"resource":"category","action":"edit","id":116,"title":"Tech & Science","color":"#00FF00","category_top":1,"top_menu_position":2,"status":3}

Delete Category

Deleting a category moves all its articles to the default category and detaches any sub-categories.

{"resource":"category","action":"delete","id":121}
Copied to clipboard!