Divi API Reference¶
Developer documentation for extending, automating, and integrating with Divi 5.
Quick Reference
What this section covers: Developer-facing documentation for extending Divi 5 — PHP hooks and filters, JavaScript events and the Builder API, custom module development, REST API integration, block JSON schema, and command-line tools.
Key PHP entry points: et_builder_ready (register modules), et_module_shortcode_output (filter output), et_save_post (post-save logic)
Key JS entry points: et_builder_api_ready (Builder API), window.divi.data.select('divi/edit-post') (read-only state)
Key REST endpoint: GET/POST /wp-json/wp/v2/pages/{id}?context=edit (read/modify Divi content)
Section Overview¶
The API Reference is for WordPress developers who want to extend Divi with custom modules, modify existing module behavior, manipulate Divi content programmatically, or build integrations (including AI-driven workflows). Each page documents a specific API surface with code examples, data structures, and known limitations.
These are reference docs — technical, precise, and code-heavy. For operational guides aimed at AI assistants, see the Playbooks section. For architecture internals, see the Internals section.
Pages¶
| Page | What It Covers | Status |
|---|---|---|
| Hooks & Filters | PHP action/filter hooks and JS events | ✅ Complete |
| Custom Modules | Building custom Divi 5 modules | ✅ Complete |
| REST API Integration | Reading and modifying Divi content via WP REST API | ✅ New |
| Block JSON Reference | Block JSON attribute schema and module-specific structures | ✅ New |
| JavaScript API | Complete Builder JS API reference | ✅ New |
| Divi Data Registry | Read-only access to VB module state | ✅ New |
| Module JSON Schema | module.json configuration schema | ✅ New |
| Module Rendering Lifecycle | Module lifecycle from registration to rendered output | ✅ New |
| WP-CLI Integration | Command-line operations for Divi content | ✅ New |
Where to Start¶
Choose a path based on what you're building:
Extending Divi with new modules¶
Start with Custom Modules for the end-to-end module development workflow. Reference Module JSON Schema for the module.json configuration file that defines your module's settings, and Module Rendering Lifecycle to understand how your module moves from registration through server-side rendering to Visual Builder preview.
Manipulating Divi content programmatically¶
Start with REST API Integration to learn how to read and modify existing Divi page content through the WordPress REST API. Use Block JSON Reference to understand the JSON attribute structure inside each block comment. For bulk operations or CI/CD workflows, see WP-CLI Integration.
Building AI integrations¶
Start with REST API Integration for the programmatic content modification pattern, then Block JSON Reference for the data structures you'll be reading and writing. Use Divi Data Registry for read-only access to module state inside the Visual Builder. Review the Known Limitations playbook before writing any automation code — it documents the create-vs-modify rule and other critical constraints.
Customizing existing module behavior¶
Start with Hooks & Filters for the complete PHP and JavaScript hook reference. Use JavaScript API for the full Builder API object documentation, including API.Modules, API.Utils, and event handling.
Cross-References¶
The API Reference documents the interfaces for extending Divi. For the underlying architecture and data formats, see:
- Internals — Block comment format, JSON attribute map, content encoding rules, SSR rendering pipeline
- Playbooks — Operational guides for AI assistants: REST API Content Management, Known Limitations, Visual Builder Operations
- CSS Reference — Class names, selectors, and CSS override patterns for styling Divi output