RatePress
RatePress Docs

Getting Started

  • Introduction
  • Getting Started

Core Features

  • Rating System
  • Templates
  • Blocks & Shortcodes

Advanced Features

  • Notifications
  • Confetti Effects

Languages

  • Translation System

Developer Guide

  • Architecture
  • API Reference
GitHubLive Demos

RatePress

The modern rating plugin for WordPress. Built with clean architecture, designed for performance, and loved by developers.

Documentation

  • Get Started
  • Technical Architecture
  • Templates
  • Translations

Resources

  • Download
  • Support
  • Contact
  • Review Us

© 2025 RatePress. All rights reserved.

Made with passion by Code Idealists

API ReferenceREST API

RatePress REST API

Comprehensive REST API for programmatic access to all RatePress features. Submit ratings, retrieve analytics, manage templates, and configure settings.

Get StartedView Endpoints

API Overview

Modern REST API with category-based rating system

RESTful Design

Clean, predictable endpoints following REST principles

Secure

Built-in rate limiting, validation, and WordPress security

Category-Based

Flexible rating types: binary, bipolar, scale

Headless Ready

Perfect for headless WordPress implementations

Base URL

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

Authentication & Permissions

How to authenticate API requests

Public Access

Rating submission and statistics endpoints are publicly accessible with built-in rate limiting.

Endpoints:

  • POST /rate - Submit ratings
  • GET /stats/{object_id} - Get rating statistics
  • POST /preview - Block editor previews
These endpoints include automatic rate limiting and spam protection.

Core Endpoints

Rating submission and statistics

POST /rate

Submit a rating for any object

Parameters

ParameterTypeRequiredDescription
object_idintegerYesPost ID or object identifier
object_typestringNoObject type (default: "post")
categorystringYesRating category: "binary", "bipolar", "scale"
valuenumberYesRating value (depends on category)

Example Request

Success Response (200)

Analytics API

Comprehensive analytics and reporting

Statistics
  • GET /analytics/stats - Site-wide statistics
  • GET /analytics/top-rated - Top rated content
  • GET /analytics/recent - Recent ratings
  • GET /analytics/trends - Rating trends over time
  • GET /analytics/trends-by-category - Trends by rating category
  • GET /analytics/distribution - Category distribution
  • GET /analytics/top-posts-overview - Top posts overview
User Analytics
  • GET /analytics/users - User rating statistics
  • GET /analytics/user-details/{id} - Detailed user stats
  • GET /analytics/post-details/{id} - Post-specific analytics
Example: Get Site Statistics

Management APIs

Settings, templates, and data management

Admin Access Required: All management endpoints require administrator privileges. Include Basic Auth headers in your requests.
GET /settings

Retrieve current RatePress settings

POST /settings

Update RatePress settings

Error Codes & Responses

Understanding API errors and status codes

Success Responses
200 OKRequest successful
201 CreatedResource created
Error Responses
400 Bad RequestInvalid parameters
401 UnauthorizedAuthentication required
403 ForbiddenInsufficient permissions
404 Not FoundResource not found
429 Too Many RequestsRate limit exceeded
500 Internal ErrorServer error
Error Response Format

SDK Examples

Ready-to-use code snippets for common tasks

RatePress JavaScript SDK

Ready to Integrate?

Start building with RatePress API. Check out our complete documentation and join our developer community for support and examples.

Get Started GuideGitHub RepositoryDeveloper Support