Skip to content

API Reference

The FRS ecosystem exposes REST APIs and WordPress Abilities for integration with external systems and AI assistants.

REST API Overview

All plugins use the WordPress REST API with their own namespaces:

PluginNamespaceBase URL
frs-wp-usersfrs-users/v1/wp-json/frs-users/v1/
frs-lead-pagesfrs-lead-pages/v1/wp-json/frs-lead-pages/v1/
frs-addcal-syncfrs-addcal/v1/wp-json/frs-addcal/v1/
frs-property-valuationfrs-property-valuation/v1/wp-json/frs-property-valuation/v1/
frs-mortgage-calculatorfrs-mortgage-calculator/v1/wp-json/frs-mortgage-calculator/v1/
frs-wp-modern-datafrs-modern-data/v1/wp-json/frs-modern-data/v1/
email-template-builderetb/v1/wp-json/etb/v1/

Authentication

For logged-in WordPress users:

javascript
fetch('/wp-json/frs-users/v1/profiles', {
  credentials: 'same-origin',
  headers: {
    'X-WP-Nonce': wpApiSettings.nonce
  }
});

Application Passwords

For external applications (WordPress 5.6+):

bash
curl -X GET \
  'https://myhub21.com/wp-json/frs-users/v1/profiles' \
  -u 'username:xxxx xxxx xxxx xxxx xxxx xxxx'

JWT Authentication

If using JWT plugin:

bash
curl -X GET \
  'https://myhub21.com/wp-json/frs-users/v1/profiles' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN'

Common Response Format

Success Response

json
{
  "data": [...],
  "total": 100,
  "pages": 10,
  "page": 1
}

Error Response

json
{
  "code": "rest_forbidden",
  "message": "Sorry, you are not allowed to do that.",
  "data": {
    "status": 403
  }
}

Pagination

Most list endpoints support pagination:

ParameterDefaultDescription
page1Page number
per_page20Items per page (max: 100)

Response headers include:

  • X-WP-Total - Total items
  • X-WP-TotalPages - Total pages

API Sections

Profiles API

User profile CRUD operations.

Intranet API

Directory, org chart, bookmarks.

Lead Pages API

Lead capture and page management.

Calculator API

Mortgage calculations and lead submission.


WordPress Abilities API

The Abilities API (WordPress 6.9+) provides a standardized way for AI assistants to interact with WordPress.

What are Abilities?

Abilities are registered functions that AI assistants can discover and call:

php
wp_register_ability('frs-users/list-profiles', [
    'label' => 'List Profiles',
    'description' => 'Query user profiles with filters',
    'category' => 'user-management',
    'input_schema' => [...],
    'output_schema' => [...],
    'callback' => [$this, 'list_profiles']
]);

Ability Categories

CategoryPluginPurpose
user-managementfrs-wp-usersProfile queries
profile-managementfrs-wp-usersProfile editing
intranetfrs-wp-usersDirectory, org chart
frs-data-managementfrs-wp-modern-dataWordPress data queries
frs-content-operationsfrs-wp-modern-dataContent CRUD
greenshift-blocksfrs-wp-modern-dataBlock creation

MCP Protocol

The MCP (Model Context Protocol) adapter allows AI assistants to:

  1. Discover Tools - List available abilities
  2. Call Tools - Execute abilities with parameters
  3. Access Resources - Read WordPress content
MCP Client → frs-wp-modern-data → WordPress Abilities → Plugin Callbacks

Abilities Reference


Rate Limiting

Coming Soon

Rate limiting is planned for Q2 2026. Currently no limits enforced.

Planned limits:

  • Authenticated: 1000 requests/hour
  • Unauthenticated: 100 requests/hour

Versioning Policy

  • URL versioning: /v1/, /v2/
  • Breaking changes require new version
  • Previous version supported for 1 year
  • Deprecation notices 2 quarters ahead

Hub21 Platform Documentation