WP Webhooks / Docs / get_rest_route_schema
AI Ability since v2.2.0

get_rest_route_schema

Read a REST route's argument contract on this site — every argument with its type and whether it is required.

$

Describe a REST API route on THIS site (core or any plugin) from its self-declared schema: every argument with its type, description and whether it is REQUIRED. Build with AI runs this before building an internal automation — a webhook whose endpoint points at your own wp-json — so required fields (e.g. POST /wp/v2/users needs username, email AND password, which field mapping alone cannot always supply) are satisfied with a Code Glue snippet, or called out honestly, instead of guessed. Internal routes only — it cannot describe external APIs. Registered as the WordPress Ability flowsystems-webhook-actions/get_rest_route_schema, so external AI tools (Claude Code, Cursor) can call it over MCP or REST with a scoped API token.

/ Plan step shape

{ "ability": "get_rest_route_schema", "input": { "route":, "method":} }

/ Scope & confirmation

Minimum API-token scope for external (MCP/REST) callers: read. Read-only — the agent runs it freely while planning.

/ Input fields

NameInTypeReqDescription
routeparamstringyesRoute path relative to /wp-json, e.g. "/wp/v2/users". A full URL to this site's REST API is also accepted.
methodparamstringHTTP method you plan to use — GET, POST (default), PUT, PATCH or DELETE.

/ Examples

Plan step as Build with AI proposes it

{
  "id": "step_1",
  "ability": "get_rest_route_schema",
  "summary": "…",
  "input": {
    "route": "/wp/v2/users",
    "method": "POST"
  }
}

/ Related

Ready

Your next automation is
one sentence away.

$ wp plugin install flowsystems-webhook-actions --activate