Rest API Overview
The Rest API allows external applications, such as mobile apps, static site generators, or headless frontends, to read and modify content stored in Vvveb CMS.
It is disabled by default for security, and must be explicitly enabled before use.
Once active, the API exposes posts, products, users, taxonomies, and other resources through clean, predictable endpoints.
Enabling the Rest API
The API is turned off by default. To enable it, edit env.php and set the REST constant to true:
defined('REST') || define('REST', true);
If you do not have direct access to server files, you can enable it using the File manager plugin, available in the plugin marketplace.
Authentication
All API requests require authentication. Vvveb supports two methods:
- Bearer tokens
- HTTP Basic Authentication (username and password)
Any admin user with the appropriate REST permissions can authenticate.
Bearer token example
curl -H 'Authorization: Bearer mytoken' 'https://demo.vvveb.com/rest/posts/hello-world-1'
Basic auth example
curl --user demo:demo 'https://demo.vvveb.com/rest/posts/hello-world-1'
Authentication is required for both reading and writing data unless a plugin or custom configuration explicitly exposes public endpoints.
Permissions and Access Control
Access to API resources is controlled through admin roles. Permissions can be granted or restricted per:
- Resource (posts, products, users, etc.)
- Action (read, write, update, delete)
This ensures that only authorized users or applications can perform sensitive operations.
OpenAPI Documentation
Interactive API documentation is available through the Open Api plugin, which automatically generates:
- Endpoint lists
- Request/response schemas
- Authentication examples
- Live testing interface
This is the recommended way to explore the full API surface.
Next.js Starter Project
A ready‑to‑use example project is available for developers building headless frontends with Next.js. It demonstrates:
- Fetching posts via the REST API
- Rendering content statically or dynamically
- Using Vvveb as a headless CMS
GitHub repository:
https://github.com/givanz/nextjs-headless-rest-vvveb
Live demo:
https://nextjs-headless-rest-vvveb.vercel.app/
The Rest API turns Vvveb into a flexible headless CMS, making it easy to integrate with modern frameworks and external applications.