Extra Chill API
Central REST API infrastructure for the Extra Chill network. Enables headless use of the platform.
by Extra Chill · github.com/extra-chill/extrachill-api · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/extra-chill/extrachill-api/releases/download/v0.31.1/extrachill-api.zipReadme
ExtraChill API
Network-activated REST API infrastructure for the Extra Chill Platform WordPress multisite network. Centralizes all custom REST endpoints under a single extrachill/v1 namespace for consistent access across web, mobile, and AI clients.
Overview
The ExtraChill API plugin provides a centralized, versioned REST API infrastructure that replaces legacy admin-ajax.php handlers with modern WordPress REST API endpoints. It uses automatic route discovery to modularly organize endpoints by feature area while maintaining a consistent API surface across the entire multisite network.
The plugin also owns the network-wide activity storage table ({base_prefix}extrachill_activity) used by the activity feed endpoints.
Features
- Network-Wide Activation: All endpoints available on every site in the multisite network
- Activity Storage: Maintains the network-wide
{base_prefix}extrachill_activitytable used by the activity feed endpoints - Automatic Route Discovery: Recursively loads route files from
inc/routes/ - Versioned Namespace: All endpoints are under
extrachill/v1 - Modular Organization: Routes are organized by feature (
admin/,artists/,shop/, etc.) - Security: Endpoints use permission callbacks, validation, and sanitization (per-route implementation)
- Activity Storage: Maintains a network-wide
{base_prefix}extrachill_activitytable used by activity endpoints
Current Endpoints
The plugin ships route files under inc/routes/ (loaded recursively) and registers endpoints under the extrachill/v1 namespace:
Authentication Endpoints (7)
POST /auth/browser-handoff- Browser handoff for cross-device authPOST /auth/google- Google OAuth authenticationPOST /auth/login- User login returning access + refresh tokensPOST /auth/logout- Logout and token revocationGET /auth/me- Get current authenticated userPOST /auth/refresh- Refresh access tokensPOST /auth/register- User registration
Configuration Endpoints (1)
GET /config/oauth- OAuth provider configuration
Analytics Endpoints
POST /analytics/click- Unified click trackingGET /analytics/link-page- Fetch link page analyticsGET /analytics/events- Query network analytics events (requiresmanage_network_options)GET /analytics/events/summary- Aggregate network event stats (requiresmanage_network_options)GET /analytics/meta- Analytics filter metadata (requiresmanage_network_options)POST /analytics/link-page- Track link page view events
Artist API (9)
GET/PUT /artists/{id}- Core artist profile dataGET/PUT /artists/{id}/socials- Social media linksGET/PUT /artists/{id}/links- Link page dataGET /artists/{id}/analytics- Link page analyticsGET /artists/{id}/permissions- Check artist permissionsGET/POST/DELETE /artists/{id}/roster- Roster member managementGET /artists/{id}/subscribers- List subscribers with paginationGET /artists/{id}/subscribers/export- Export subscribers as CSVPOST /artists/{id}/subscribe- Public subscription signup
Block Generators (3)
POST /blog/band-name- AI band name generationPOST /blog/rapper-name- AI rapper name generationPOST /blog/ai-adventure- AI adventure story generation
Image Voting (2)
GET /blog/image-voting/vote-count/{post_id}/{instance_id}- Get vote countsPOST /blog/image-voting/vote- Cast a vote
Community Endpoints (3)
GET /users/search- Search users for @mentions and adminPOST /community/upvote- Upvote topics or replies (authenticated)GET/POST/DELETE /community/drafts- Manage bbPress drafts (authenticated)
Contact (1)
POST /contact/submit- Submit contact form with Turnstile verification
Activity Endpoints (2)
GET /activity- Activity feed with filtering and pagination (authenticated)GET /object- Object resolver for posts, comments, and artists (authenticated)
Admin Endpoints
GET /admin/artist-access- List pending artist access requestsGET/POST /admin/artist-access/{user_id}/approve- Approve artist access requestPOST /admin/artist-access/{user_id}/reject- Reject artist access requestGET /admin/lifetime-membership- List all lifetime membershipsPOST /admin/lifetime-membership/grant- Grant Lifetime Extra Chill Membership (ad-free)DELETE /admin/lifetime-membership/{user_id}- Revoke Lifetime Extra Chill MembershipGET /admin/team-members- List all team members with search/paginationPOST /admin/team-members/sync- Sync team membersPUT /admin/team-members/{user_id}- Manage team member statusGET /admin/tag-migration- List tags for migration searchingGET /admin/forum-topics- List and manage bbPress topics across networkGET /admin/forum-topics/{topic_id}- Manage a single bbPress topicPUT /admin/forum-topics/{topic_id}/status- Update bbPress topic statusGET /admin/404-logger- Monitor 404 errors for SEO managementGET /admin/artist-relationships- Manage user-artist links
User Management (5)
GET /users/{id}- Get user profileGET/POST /users/onboarding- User onboarding flowGET /users/leaderboard- Get user leaderboard with rankingsGET/POST/DELETE /users/{id}/artists- Manage user-artist relationshipsGET /users/search- Find users (multiple contexts)
Documentation (2)
GET /docs-info- Documentation metadataPOST /sync/doc- Sync documentation
Event Submissions (1)
POST /event-submissions- Submit event with optional flyer
Venue Booking Transport (2)
POST /venues/{venue}/booking-inquiries- Submit a Turnstile-protected anonymous or authenticated booking inquiryGET /events/bookings/{booking_id}/attachments/{attachment_id}/download- Stream an authorized private booking attachment
Media Management (1)
POST /media- Upload media
Newsletter (2)
POST /newsletter/subscribe- Subscribe to newsletterPOST /newsletter/campaign/push- Push newsletter to Sendy
Shop Integration
GET/POST/PUT/DELETE /shop/products- Product CRUD operationsGET /shop/orders- List orders (requires WooCommerce on the shop site)PUT /shop/orders/{id}/status- Mark shipped (status=completed)POST /shop/orders/{id}/refund- Issue full refundPOST/DELETE /shop/products/{id}/images- Product image managementGET/POST/DELETE /shop/stripe- Stripe Connect managementPOST /shop/stripe-webhook- Stripe webhook handlerGET/PUT /shop/shipping-address- Artist shipping from-address managementGET/POST /shop/shipping-labels- Purchase and retrieve shipping labels
Stream (1)
GET /stream/status- Check streaming status and configuration
Tools (2)
POST /tools/qr-code- Generate QR codesGET /tools/markdown-export- Export content as markdown
SEO Endpoints (5)
POST /seo/audit- Start multisite SEO audit (full or batch mode)POST /seo/audit/continue- Continue paused batch auditGET /seo/audit/status- Check audit status and resultsGET /seo/audit/details- Get detailed audit results by category with paginationGET /seo/config- Get SEO audit configuration
See CLAUDE.md for architectural patterns and docs/routes/ for complete endpoint documentation.
Usage
For Plugin Developers
Add new endpoints by creating route files in inc/routes/:
<?php
/**
* Custom endpoint registration
*/
add_action('extrachill_api_register_routes', function() {
register_rest_route('extrachill/v1', '/my-endpoint', [
'methods' => 'GET',
'callback' => 'my_endpoint_callback',
'permission_callback' => '__return_true',
]);
});
function my_endpoint_callback($request) {
return rest_ensure_response(['status' => 'success']);
}
For Client Developers
Access endpoints using standard WordPress REST API patterns:
JavaScript:
fetch('/wp-json/extrachill/v1/users/search?search=username', {
method: 'GET',
headers: {
'X-WP-Nonce': wpApiSettings.nonce
}
})
.then(response => response.json())
.then(data => console.log(data));
PHP:
$response = wp_remote_get(
rest_url('extrachill/v1/users/search'),
['body' => ['search' => 'username']]
);
Architecture
Singleton Pattern
The plugin uses a singleton class to manage route discovery and prevent duplicate registrations:
ExtraChill_API_Plugin::get_instance();
Automatic Route Discovery
Routes are automatically loaded using PHP's RecursiveIteratorIterator:
- Scans
inc/routes/directory recursively - Loads all PHP files via
require_once - Supports nested directory organization
- Routes self-register using WordPress REST API
Action Hooks
extrachill_api_bootstrap- Initialization duringplugins_loadedextrachill_api_register_routes- Route registration duringrest_api_init
Taxonomy Projection Ownership
Extra Chill API does not synchronize or persist shared taxonomy terms. On-demand term projection is owned by Extra Chill Network through the extrachill/project-network-term ability.
Directory Structure
extrachill-api/
├── extrachill-api.php # Main plugin file
├── build.sh # Production build script (symlink)
├── composer.json # Dependencies and scripts
├── .buildignore # Build exclusions
├── CLAUDE.md # Technical documentation for AI agents
├── README.md # This file
└── inc/
├── auth/
│ └── extrachill-link-auth.php # Cross-domain authentication helper
├── activity/ # Activity system components
│ ├── db.php
│ ├── emitter.php
│ ├── emitters.php
│ ├── schema.php
│ ├── storage.php
│ ├── taxonomies.php
│ └── throttle.php
├── controllers/
│ └── class-docs-sync-controller.php
├── utils/
│ └── id-generator.php
└── routes/
├── admin/
│ ├── 404-logger.php
│ ├── lifetime-membership.php
│ ├── artist-access.php
│ ├── artist-relationships.php
│ ├── forum-topics.php
│ ├── tags.php
│ └── team-members.php
├── activity/
│ ├── feed.php
│ └── object.php
├── analytics/
│ ├── click.php
│ └── link-page.php
├── artists/
│ ├── analytics.php
│ ├── artist.php
│ ├── links.php
│ ├── permissions.php
│ ├── roster.php
│ ├── socials.php
│ ├── subscribe.php
│ └── subscribers.php
├── auth/
│ ├── browser-handoff.php
│ ├── google.php
│ ├── login.php
│ ├── logout.php
│ ├── me.php
│ ├── refresh.php
│ └── register.php
├── blog/
│ ├── ai-adventure.php
│ ├── band-name.php
│ ├── image-voting.php
│ ├── image-voting-vote.php
│ └── rapper-name.php
├── chat/
│ ├── history.php
│ └── message.php
├── community/
│ ├── drafts.php
│ └── upvote.php
├── config/
│ └── oauth.php
├── contact/
│ └── submit.php
├── docs/
│ └── docs-info.php
├── docs-sync-routes.php
├── events/
│ └── event-submissions.php
├── media/
│ └── upload.php
├── newsletter/
│ ├── campaign.php
│ └── subscription.php
├── seo/
│ ├── audit.php
│ ├── continue.php
│ ├── status.php
│ ├── details.php
│ └── config.php
├── shop/
│ ├── orders.php
│ ├── product-images.php
│ ├── products.php
│ ├── shipping-address.php
│ ├── shipping-labels.php
│ ├── stripe-connect.php
│ └── stripe-webhook.php
├── stream/
│ └── status.php
├── tools/
│ ├── qr-code.php
│ └── markdown-export.php
└── users/
├── artists.php
├── leaderboard.php
├── onboarding.php
├── search.php
└── users.php
Development
Production Build
./build.sh
Testing Endpoints
wp rest list
Integration
Current Plugin Integrations
extrachill-blog:
- Image voting vote counts and voting
- AI Adventure story generation
- Band/Rapper name generators
extrachill-community:
- User search for @mentions
- Community upvoting
- Draft management for topics and replies
extrachill-events:
- Event submission block posts to the
/event-submissionsroute
extrachill-users:
- Avatar upload via media endpoint
- User profile and search functionality
extrachill-shop:
- Product CRUD operations
- Stripe Connect management
extrachill-newsletter:
- Newsletter subscription endpoint
- Campaign push to Sendy
Security
All endpoints implement WordPress REST API security standards:
- Nonce Verification: WordPress REST API nonce system
- Permission Callbacks: User capability checks
- Input Validation: Parameter validation callbacks
- Sanitization: All user input sanitized
- Output Escaping: Responses via
rest_ensure_response()
Performance
- Route files load once via
require_onceon plugin init - Per-endpoint performance depends on the underlying query and site context (some endpoints switch blog context)
Dependencies
Runtime:
- WordPress multisite
Optional integrations:
- WooCommerce (required by some
/shop/*routes, in the shop site context) extrachill-multisite(provides shared multisite helpers used by some routes)extrachill-ai-client(used by AI generator routes when enabled)
Hooks
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v0.31.1 | Aug 22, 2026 | extrachill-api.zip | 55 |
| v0.31.0 | Aug 22, 2026 | extrachill-api.zip | 2 |
| v0.30.0 | Aug 5, 2026 | extrachill-api.zip | 5 |
| v0.29.0 | Aug 4, 2026 | extrachill-api.zip | 1 |
| v0.28.0 | Aug 2, 2026 | extrachill-api.zip | 2 |
| v0.27.0 | Jul 27, 2026 | extrachill-api.zip | 2 |
| v0.26.1 | Jul 23, 2026 | 01-extrachill-api.zip | 1 |
| v0.26.1 | Jul 23, 2026 | extrachill-api.zip | 0 |
| v0.26.0 | Jul 20, 2026 | 01-extrachill-api.zip | 2 |
| v0.26.0 | Jul 20, 2026 | extrachill-api.zip | 0 |
| v0.25.3 | Jul 18, 2026 | 01-extrachill-api.zip | 1 |
| v0.25.3 | Jul 18, 2026 | extrachill-api.zip | 0 |
| v0.25.2 | Jul 15, 2026 | 01-extrachill-api.zip | 1 |
| v0.25.2 | Jul 15, 2026 | extrachill-api.zip | 0 |
| v0.25.1 | Jul 13, 2026 | 01-extrachill-api.zip | 0 |
| v0.25.1 | Jul 13, 2026 | extrachill-api.zip | 0 |
| v0.25.0 | Jul 13, 2026 | 01-extrachill-api.zip | 0 |
| v0.25.0 | Jul 13, 2026 | extrachill-api.zip | 0 |
| v0.24.0 | Jul 12, 2026 | 01-extrachill-api.zip | 0 |
| v0.24.0 | Jul 12, 2026 | extrachill-api.zip | 0 |
| v0.23.2 | Jul 12, 2026 | 01-extrachill-api.zip | 1 |
| v0.23.2 | Jul 12, 2026 | extrachill-api.zip | 0 |
| v0.23.1 | Jul 12, 2026 | 01-extrachill-api.zip | 1 |
| v0.23.1 | Jul 12, 2026 | extrachill-api.zip | 0 |
| v0.23.0 | Jun 30, 2026 | 01-extrachill-api.zip | 0 |