WordPress REST API Generator
Generate register_rest_route() boilerplate with namespaces, HTTP methods, permission callbacks, and handler stubs — ready to paste into your plugin.
Skip hand-wiring rest_api_init, route args, and WP_REST_Response handlers on every new endpoint.
Custom REST routes repeat the same registration pattern
Namespace, route path, HTTP methods, permission callbacks, validated args, and per-method handlers returning WP_REST_Response — the WordPress REST API is powerful, but the setup is repetitive.
Zelvigo’s REST API Generator builds consistent registration scaffolding so you focus on the business logic inside each handler.
What you can generate
- Namespace — vendor/version format, e.g.
myplugin/v1 - Route — path without a leading slash; supports capture groups
- HTTP methods — GET, POST, PUT, PATCH, DELETE (select one or more)
- Permission callback — administrators, editors, logged-in users, or public
- Route arguments (optional) — one per line, e.g.
id:integer|required - Handler stubs — separate callbacks per method returning
WP_REST_Response
Add a screenshot of the Create REST Route screen here.
How it works
- Open Zelvigo Dev Studio → Create REST Route
- Set namespace, route, HTTP methods, permissions, and optional route args
- Click Generate and review the registration + handler PHP
- Replace placeholder logic in each handler with your API business rules
- Copy into your plugin or include in a plugin package
Works best with
- CPT Generator — expose custom post types via your own read/write endpoints
- AJAX Generator — in-dashboard actions; REST for external apps and headless front ends
- Settings API Generator — store options in admin; REST routes serve or update them for clients
- Plugin Boilerplate — export REST routes with CPTs, cron jobs, and admin UI in one ZIP
Frequently asked questions
Is the REST API Generator available today?
Yes. It is included in Zelvigo Dev Studio Pro. Open REST API Generator → Create REST Route, configure namespace, route, methods, and permissions, then click Generate.
Do I need a Pro license?
Yes. REST API generation runs through the Zelvigo cloud engine and requires an active Pro license. Local tools like Debug Log Viewer and Hook Explorer do not.
Can I include REST routes in a plugin ZIP?
Yes. Generate your routes, then select them when you build a Plugin Boilerplate package alongside CPTs, settings pages, cron jobs, and other modules.
Generate your next REST endpoint fast
Define namespace and methods once, get register_rest_route() scaffolding with permission callbacks and handler stubs, then focus on your API logic.
