REST API
API Reference
Full documentation for the NewsPro REST API. Manage content, media, and users programmatically.
Users
Available Fields
| Field | Type | Description |
|---|---|---|
user_id | int | User ID |
username | string | Unique username (min 4 chars, lowercase) |
email | string | Unique email address |
firstname | string | First name |
lastname | string | Last name |
biography | string | Short bio shown on author profile page |
avatar | string | Avatar image URL (200×200) |
user_role | int | Role ID — see Dashboard → Settings → Users |
language | string | UI language code (e.g. en-US, he-IL) |
account_suspended | int | 0 = active, 1 = suspended |
link_website | string | Personal website URL |
link_x | string | X (Twitter) profile URL |
link_facebook | string | Facebook profile URL |
link_instagram | string | Instagram profile URL |
link_youtube | string | YouTube channel URL |
link_linkedin | string | LinkedIn profile URL |
created_at | datetime | Registration date |
Get Users
{"resource":"user","action":"get","filters":{"user_role":2,"account_suspended":0,"search":"john"},"fields":["user_id","username","email","firstname","lastname","user_role","created_at"],"limit":20}
Get Single User
{"resource":"user","action":"get","id":3}
Add User
{"resource":"user","action":"add","firstname":"John","lastname":"Doe","username":"johndoe","email":"john@example.com","user_role":2,"language":"en-US","account_suspended":0,"avatar":"https://example.com/avatar.jpg","biography":"Senior reporter covering international affairs","link_website":"https://johndoe.com","link_x":"https://x.com/johndoe"}
Edit User
All fields are optional except user_id.
{"resource":"user","action":"edit","user_id":3,"firstname":"John Updated","biography":"Updated bio","user_role":2,"account_suspended":0}
Delete User
{"resource":"user","action":"delete","user_id":3}
Copied to clipboard!