Introduction
The Users API provides comprehensive endpoints for managing users, roles, and permissions in the Blog Marketing Platform. This API allows you to list users, update their information, change roles, manage status, and delete users.Base URL
Authentication
All Users API endpoints require authentication. Include your access token in the Authorization header:User Object
The User object represents a user in the system with the following structure:Unique identifier for the user
Unique username for the user
User’s email address
User’s first name
User’s last name
User’s role in the system. Available roles:
administrador- Full system accesseditor- Can publish and edit any postautor- Can create and edit own postsescritor- Can create posts (equivalent to autor)comentador- Can only comment and react
URL to user’s avatar image
Current user status. One of:
active, inactive, suspendedISO 8601 timestamp of user’s last login
ISO 8601 timestamp of when the user was created
Array of permission strings the user has access to
User statistics object
Total number of posts created by the user
Total number of comments approved by the user
Total number of users managed (admin only)
Total number of posts edited
Total number of posts published
Total number of comments moderated
Total views across all user’s content
Example User Object
Available Roles
The system supports the following roles with their corresponding IDs:| Role ID | Role Name | Description |
|---|---|---|
| 1 | administrador | Full system access, can manage users and assign roles |
| 2 | editor | Can publish posts, edit any post, moderate comments |
| 3 | autor | Can create and edit own posts |
| 4 | comentador | Can only comment and react to posts |
The roles
creador and escritor are mapped to autor (ID: 3) in the backend.Rate Limiting
API requests are rate-limited to ensure system stability:- Standard users: 100 requests per minute
- Authenticated users: 1000 requests per minute
- Admin users: 5000 requests per minute
Error Handling
The Users API uses standard HTTP response codes:| Status Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Missing or invalid authentication |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - User doesn’t exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Next Steps
User CRUD Operations
Learn how to list, update, delete users and manage roles
User Profiles
Manage user profiles, activity tracking, and social links