Skip to content

Headless for ProcessWire

Headless (trk/processwire-headless) turns any ProcessWire 3 site into a full or hybrid REST API platform managed from Setup -> Headless. Expose Pages, Entries blueprints (with batch mutations, drafts, revisions, aggregations, and CSV/ICS exports), declarative ResourceBlueprint collections, custom HeadlessAction handlers, auto-generated OpenAPI 3.1 + TypeScript .d.ts schemas, and signed outbound webhooks.

Setup -> Headless unifies Personal Access Tokens, refresh token governance, outbound webhooks, and live schema inspection in one workspace.

Full & Hybrid Headless Modes

Run REST endpoints under /api/v1 alongside traditional PHP templates (Hybrid), or call $headless->doHeadless() to serve JSON across all non-admin frontend routes with configurable PassthroughMatcher rules.

5 Authentication Guards

Mix Public, ApiKey (whk_*), BearerJwt (HS256 + whr_* refresh rotation with reuse detection), Hmac (with WireCache nonce replay guard), and Session (X-CSRF-Token) per endpoint or resource.

OpenAPI 3.1 & TypeScript .d.ts

Auto-generate /api/v1/schema/openapi.json, /api/v1/schema/typescript, and per-provider JSON Schema Draft 2020-12 definitions from live ProcessWire fields, Entries blueprints, and sibling providers.

Signed Queued Webhooks

Dispatch whsec_-signed outbound webhooks synchronously or via DeliverHeadlessWebhookQueue with SSRF validation, pinned-IP HTTP transport, and delivery telemetry.

Requirement Minimum Version Notes
PHP 8.4+ Uses strict types, HKDF-SHA256 (SecretVault), and PHP 8.4 enums/DTOs.
ProcessWire 3.0.271+ Auto-booted module (autoload => true, installs ProcessHeadless, permission headless).
Required Modules Inertia, React, Entries Stores configuration and credentials in 4 hidden Entries blueprints (zero custom SQL tables).
Companion & CLI ProcessHeadless, processwire-console Mounted at Setup -> Headless; 4 headless:* CLI commands + DeliverHeadlessWebhookQueue.

Next steps