REST API
LW Plugins provide REST API endpoints for headless WordPress implementations and third-party integrations.
Authentication
- Public endpoints (marked as “Public”) require no authentication
- Authenticated endpoints require a logged-in user or Application Passwords
- Admin endpoints require
manage_optionscapability
Use Basic Auth with Application Passwords for programmatic access:
curl -u "username:xxxx xxxx xxxx xxxx" https://example.com/wp-json/lw-seo/v1/meta/1LW SEO
Base URL: /wp-json/lw-seo/v1
All LW SEO endpoints are public (no authentication required).
GET /meta/{id}
Get SEO meta data for a post by ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Post ID |
Response:
{
"title": "Post Title - Site Name",
"description": "Auto-generated or custom meta description",
"canonical": "https://example.com/post-slug/",
"robots": {
"index": "index",
"follow": "follow"
},
"og": {
"locale": "en_US",
"type": "article",
"title": "Post Title - Site Name",
"description": "Meta description",
"url": "https://example.com/post-slug/",
"site_name": "Site Name",
"image": "https://example.com/wp-content/uploads/image.jpg",
"article:published_time": "2026-01-15T10:00:00+00:00",
"article:modified_time": "2026-03-20T14:30:00+00:00",
"article:author": "Author Name"
},
"twitter": {
"card": "summary_large_image",
"title": "Post Title - Site Name",
"description": "Meta description",
"image": "https://example.com/wp-content/uploads/image.jpg"
}
}GET /meta/term/{id}
Get SEO meta data for a taxonomy term.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id | integer | Yes | - | Term ID |
taxonomy | string | No | category | Taxonomy name |
# Category
curl https://example.com/wp-json/lw-seo/v1/meta/term/5
# Product category
curl https://example.com/wp-json/lw-seo/v1/meta/term/12?taxonomy=product_catGET /meta/author/{id}
Get SEO meta data for an author archive.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Author (user) ID |
GET /schema/{id}
Get Schema.org JSON-LD structured data for a post.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Post ID |
GET /breadcrumbs/{id}
Get breadcrumb trail for a post.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Post ID |
LW LMS
Base URL: /wp-json/lms/v1
GET /courses
List all published courses. Public endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
per_page | integer | No | Results per page |
page | integer | No | Page number |
category | string | No | Filter by course category |
level | string | No | Filter by difficulty level |
GET /courses/{id}
Get a single course with its sections, lessons, and access info. Public endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Course ID |
GET /lessons/{id}
Get a single lesson. Public endpoint (content may be restricted based on access).
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Lesson ID |
GET /progress
Get progress for the authenticated user across all courses. Requires authentication.
POST /progress
Update lesson completion status. Requires authentication.
| Parameter | Type | Required | Description |
|---|---|---|---|
lesson_id | integer | Yes | Lesson ID |
course_id | integer | Yes | Course ID |
completed | boolean | Yes | Completion status |
GET /progress/course/{id}
Get progress for the authenticated user in a specific course. Requires authentication.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Course ID |
GET /download/{id}
Download a protected course/lesson attachment. Access is validated against course enrollment.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Attachment ID |
LW Cookie
Base URL: /wp-json/lw-cookie/v1
POST /consent
Log a user’s cookie consent decision. Public endpoint (no auth required, rate-limited).
| Parameter | Type | Required | Description |
|---|---|---|---|
categories | object | Yes | Category consent states ({necessary: true, analytics: false, ...}) |
action_type | string | Yes | Action type (e.g., accept_all, reject_all, custom) |
GET /scan-results
Get cookie scan results. Requires manage_options capability.
POST /clear-scan
Clear stored scan results. Requires manage_options capability.
POST /report-scan
Submit scan report data. Requires manage_options capability.
POST /prescan-headers
Pre-scan URLs for HTTP cookie headers. Requires manage_options capability.
POST /remote-scan
Trigger a remote headless browser scan. Requires manage_options capability.
LW Memberships
Base URL: /wp-json/lw-memberships/v1
GET /plans
List all membership plans. Public endpoint.
GET /plans/{id}
Get a single membership plan. Public endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Plan ID |
GET /memberships
List memberships. Requires authentication (users see their own memberships, admins see all).
POST /memberships
Create a new membership. Requires manage_options capability.
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id | integer | Yes | User ID |
plan_id | integer | Yes | Plan ID |
source | string | No | Source (manual, import, etc.) |
GET /memberships/{id}
Get a single membership. Requires authentication.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Membership ID |
PUT /memberships/{id}
Update a membership. Requires manage_options capability.
DELETE /memberships/{id}
Delete a membership. Requires manage_options capability.