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:
| Plugin | Namespace | Base URL |
|---|---|---|
| frs-wp-users | frs-users/v1 | /wp-json/frs-users/v1/ |
| frs-lead-pages | frs-lead-pages/v1 | /wp-json/frs-lead-pages/v1/ |
| frs-addcal-sync | frs-addcal/v1 | /wp-json/frs-addcal/v1/ |
| frs-property-valuation | frs-property-valuation/v1 | /wp-json/frs-property-valuation/v1/ |
| frs-mortgage-calculator | frs-mortgage-calculator/v1 | /wp-json/frs-mortgage-calculator/v1/ |
| frs-wp-modern-data | frs-modern-data/v1 | /wp-json/frs-modern-data/v1/ |
| email-template-builder | etb/v1 | /wp-json/etb/v1/ |
Authentication
Cookie Authentication
For logged-in WordPress users:
fetch('/wp-json/frs-users/v1/profiles', {
credentials: 'same-origin',
headers: {
'X-WP-Nonce': wpApiSettings.nonce
}
});Application Passwords
For external applications (WordPress 5.6+):
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:
curl -X GET \
'https://myhub21.com/wp-json/frs-users/v1/profiles' \
-H 'Authorization: Bearer YOUR_JWT_TOKEN'Common Response Format
Success Response
{
"data": [...],
"total": 100,
"pages": 10,
"page": 1
}Error Response
{
"code": "rest_forbidden",
"message": "Sorry, you are not allowed to do that.",
"data": {
"status": 403
}
}Pagination
Most list endpoints support pagination:
| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number |
per_page | 20 | Items per page (max: 100) |
Response headers include:
X-WP-Total- Total itemsX-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:
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
| Category | Plugin | Purpose |
|---|---|---|
user-management | frs-wp-users | Profile queries |
profile-management | frs-wp-users | Profile editing |
intranet | frs-wp-users | Directory, org chart |
frs-data-management | frs-wp-modern-data | WordPress data queries |
frs-content-operations | frs-wp-modern-data | Content CRUD |
greenshift-blocks | frs-wp-modern-data | Block creation |
MCP Protocol
The MCP (Model Context Protocol) adapter allows AI assistants to:
- Discover Tools - List available abilities
- Call Tools - Execute abilities with parameters
- Access Resources - Read WordPress content
MCP Client → frs-wp-modern-data → WordPress Abilities → Plugin CallbacksAbilities 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