rest-api
Installation
SKILL.md
WordPress REST API
When to use
- The user wants to expose a custom REST API route in WordPress with register_rest_route to read or write data.
- The user needs to authenticate a WordPress REST request or restrict a route to certain capabilities.
- The user needs to sanitize and validate incoming arguments on a WordPress REST endpoint.
When NOT to use
- Do not build a REST route for a single internal admin-only action that fits admin-ajax or an admin-post handler.
- Do not hand-roll a route when a core endpoint (posts, users, media) or a post type with show_in_rest already exposes the resource.