API Reference Card
All examples use four environment variables:
WORDPRESS_URL (your site root, e.g. https://blog.example.com), WORDPRESS_USER (admin username for write operations), WORDPRESS_APP_PASSWORD (Application Password generated in Users → Profile → Application Passwords), and MAVERA_API_KEY. Reading public content does not require auth. Writing (creating/updating posts) requires Basic auth with the Application Password. Python examples use requests; JavaScript examples use fetch.Prerequisites
1
WordPress site with REST API enabled
The REST API is enabled by default on WordPress 4.7+. Verify by visiting
https://yoursite.com/wp-json/wp/v2/posts in a browser — you should see JSON. If you get a 404, check your permalink settings (Settings → Permalinks → choose anything other than “Plain”) and ensure no security plugin is blocking the REST API.2
Create an Application Password
In WordPress Admin, go to Users → Profile → scroll to Application Passwords. Enter a name (e.g. “Mavera Integration”) and click Add New Application Password. Copy the generated password immediately — it won’t be shown again. This password is used with your username for Basic auth on write operations.
3
Mavera API key
Get your key from Mavera dashboard. The key starts with
mvra_live_.4
Install dependencies
5
Environment variables
Jobs
Rate Limits & Production Notes
Production Checklist
- Credentials in env vars or secrets manager — never in code
- Rate limiting with 200ms+ delays between WordPress API calls
-
_fieldsparameter on all GET requests to reduce payload size - Pagination handling with
X-WP-TotalPagesheader - HTML sanitization on generated content before WordPress POST
- Write operations tested on staging/development site first
- All auto-generated posts set to
status: "draft"for editorial review - Error logging and alerting for failed API calls
- Application Password scoped to minimum required capabilities
WordPress REST API Handbook
Official reference for all endpoints, authentication, and pagination.
Mavera API Reference
Personas, focus groups, brand voices, and generations.
Application Passwords Guide
Setup guide for WordPress Application Passwords.
Integration Quick Reference
Cross-platform patterns for all Mavera integrations.