REST API

REST API Overview

Use REST API Overview to work with PersonalizeWP programmatically.

PersonalizeWP includes a public REST API for visitor data, activity tracking, block resolution, and password-protected content.

Public endpoints in the current plugin

Visitor and tracking endpoints

  • POST /wp-json/personalizewp/v1/activity
  • POST /wp-json/personalizewp/v1/visitor-data
  • POST /wp-json/personalizewp/v1/visitor-segments
  • POST /wp-json/personalizewp/v1/visitor-activities

Block rendering endpoints

  • POST /wp-json/personalizewp/v2/blocks
  • POST /wp-json/personalizewp/v1/variation-blocks
  • POST /wp-json/personalizewp/v2/blocks-pwd

Legacy block endpoints

If Legacy Blocks is enabled in settings, the plugin also registers:

  • POST /wp-json/personalizewp/v1/blocks
  • POST /wp-json/personalizewp/v1/blocks-pwd

Authentication and origin checks

The current API implementation protects public endpoints with:

  • Origin validation
  • An auth token header

The header used by the plugin is:

X-PWP-Auth-Token

On the main site origin, PersonalizeWP generates the default token automatically and its own front-end runtime sends it for you.

For external origins or headless frontends, generate a key in Settings > Security > Authentication.

Common use cases

  • Track custom events
  • Read visitor segments
  • Read visitor activities
  • Read visitor profile placeholders
  • Build headless or custom front-end experiences
  • Resolve personalized or password-protected blocks outside the normal PHP render path