Comprehensive REST API for programmatic access to all RatePress features. Submit ratings, retrieve analytics, manage templates, and configure settings.
Modern REST API with category-based rating system
Clean, predictable endpoints following REST principles
Built-in rate limiting, validation, and WordPress security
Flexible rating types: binary, bipolar, scale
Perfect for headless WordPress implementations
All API endpoints are relative to your WordPress installation
https://your-site.com/wp-json/ratepress/v1/Replace your-site.com with your WordPress domain
How to authenticate API requests
Rating submission and statistics endpoints are publicly accessible with built-in rate limiting.
POST /rate - Submit ratingsGET /stats/{object_id} - Get rating statisticsPOST /preview - Block editor previewsRating submission and statistics
Submit a rating for any object
| Parameter | Type | Required | Description |
|---|---|---|---|
object_id | integer | Yes | Post ID or object identifier |
object_type | string | No | Object type (default: "post") |
category | string | Yes | Rating category: "binary", "bipolar", "scale" |
value | number | Yes | Rating value (depends on category) |
Comprehensive analytics and reporting
GET /analytics/stats - Site-wide statisticsGET /analytics/top-rated - Top rated contentGET /analytics/recent - Recent ratingsGET /analytics/trends - Rating trends over timeGET /analytics/trends-by-category - Trends by rating categoryGET /analytics/distribution - Category distributionGET /analytics/top-posts-overview - Top posts overviewGET /analytics/users - User rating statisticsGET /analytics/user-details/{id} - Detailed user statsGET /analytics/post-details/{id} - Post-specific analyticsSettings, templates, and data management
Retrieve current RatePress settings
Update RatePress settings
Understanding API errors and status codes
Ready-to-use code snippets for common tasks
Start building with RatePress API. Check out our complete documentation and join our developer community for support and examples.