
Wp Rest Api
wordpress/agent-skillsOfficial
Developer guide for building, extending, and debugging WordPress REST API routes, controllers, and schema validation.
- skills.sh installs
- 6.6K
- GitHub stars
- 2.4K
- last updated
- Aug 21, 2026
What it does
- Covers route registration,
WP_REST_Controllerclasses, argument schemas, permission callbacks, and response shaping for custom endpoints - Includes reference files on custom content types, routes and endpoints, schema, responses and fields, authentication, and discovery and parameters
- Enforces a required
permission_callbackon every route and capability checks rather than login-only authorization - Designed for WordPress plugin and theme developers targeting WordPress 7.0 or later and debugging 401, 403, or 404 errors
Install
$ npx -y skills add wordpress/agent-skills --skill wp-rest-api -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
WP REST API
When to use
Use this skill when you need to:
- create or update REST routes/endpoints
- debug 401/403/404 errors or permission/nonce issues
- add custom fields/meta to REST responses
- expose custom post types or taxonomies via REST
- implement schema + argument validation
- adjust response links/embedding/pagination
Inputs required
- Repo root + target plugin/theme/mu-plugin (path to entrypoint).
- Desired namespace + version (e.g.
my-plugin/v1) and routes. - Authentication mode (cookie + nonce vs application passwords vs auth plugin).
- Target WordPress version constraints (if below 7.0, call out).
Procedure
0) Triage and locate REST usage
- Run triage:
node skills/wp-project-triage/scripts/detect_wp_project.mjs
- Search for existing REST usage:
register_rest_routeWP_REST_Controllerrest_api_initshow_in_rest,rest_base,rest_controller_class
If this is a full site repo, pick the specific plugin/theme before changing code.
1) Choose the right approach
Details
- Repository
- github.com/wordpress/agent-skills
- Categories
- PHP & Laravel, Backend & APIs
More from wordpress/agent-skills
All 17- Wp Block Themes6.5K
- Wordpress Router6.3K
- Wp Wpcli And Ops6.2K
- Wp Project Triage6.2K
- Wp Block Development6.1K
- Wp Playground5.3K
- Wp Phpstan5.1K
- Wp Abilities Api4.8K
- Wp Interactivity Api4.6K
- Wpds4.5K
- Blueprint4.1K
- Wp Plugin Directory Guidelines4.1K
- Wp Abilities Audit3.1K
- Wp Abilities Verify3K
- Wp Plugin Development9K
- Wp Performance7K
Similar to Wp Rest Api
More PHP & Laravel
wp-abilities-apiwordpress/agent-skills4.8K installsLead-in line for the WordPress Abilities API skill, covering registration, REST exposure, and client consumption.
wp-abilities-auditwordpress/agent-skills3.1K installsStructured audit document planning Abilities API registrations for WordPress plugin REST endpoints, grouped by semantic intent.
wordpress-advanced-architecturebobmatnyc/claude-mpm-skills462 installsAdvanced WordPress REST API, WP-CLI, and caching patterns for building scalable custom endpoints and tooling.
fastify-best-practicesmcollina/skills100.8K installsComprehensive Fastify backend guide covering routes, plugins, schemas, auth, performance, and production deployment.
api-endpoint-buildersickn33/agentic-awesome-skills150 installsScaffold REST API endpoints with validation, auth checks, error handling, and docs guidance.
rest-api-designaj-geddes/useful-ai-prompts2.1K installsGuide for designing RESTful APIs covering resource naming, status codes, versioning, and OpenAPI documentation.