API
Grav's RESTful API provides headless access to your site's content, media, configuration, users, and system management. Built for AI agents, custom frontends, mobile apps, and the next-generation admin interface.
Getting Started
Getting Started with the Grav API The Grav API Plugin adds a RESTful API to your Grav site, providing full headless access to pages, media, configuration, users, and system management. Requirements Grav CMS 1.8+ PHP 8.3+ Login Plugin 3.8+ Installation Install via GPM: bin/grav...
Authentication
Authentication The API supports three authentication methods, tried in order. Requests to public endpoints (token generation, translations) skip authentication. API Keys The recommended method for server-to-server integrations and CLI tools. Generate a key: bin/plugin api keys:generate --u...
Rest API Reference
Complete REST API endpoint reference with parameters, examples, and response codes. All endpoints are prefixed with the configured route (default: /api/v1).
Events
API Events The API fires events before and after all write operations, allowing plugins to react, validate, modify data, or cancel operations. API Events (onApi*) These are the API plugin's own events, fired for every mutation: Page Events Event When Data onApiBeforeP...
Developer Guide
API Developer Guide This guide covers how plugin developers can integrate with the Grav API and the next-generation admin interface (admin-next). Extending the API Any plugin can add custom API endpoints. See the Plugin API Integration guide for the full step-by-step. The short version: ...