Guide

Schema SEO REST API

Custom routes under prc-schema-seo/v1 for redirects, QR uploads, and Google Search Console refresh. Core post SEO fields also ride on wp/v2 via registered REST fields — this page covers only register_rest_route endpoints.

Base path: /wp-json/prc-schema-seo/v1/

Auth summary

CapabilityRoutes
edit_postsDELETE /redirect/{id}, GET /redirect-notice/{post_id}
edit_post for target postPOST /qr-attachment/{post_id}, POST /gsc-inspect/{id}

Route index

MethodPathSourcePurpose
DELETE/redirect/{id}class-redirect-on-slug-change.phpUndo a slug-change redirect
GET/redirect-notice/{post_id}samePoll once for pending redirect notice after save
POST/qr-attachment/{post_id}class-qr-attachment.phpUpload / regenerate QR PNG attachment
POST/gsc-inspect/{id}class-search-console.phpRefresh Search Console URL Inspection cache

GET /redirect-notice/{post_id}

After save, the editor polls this route. On hit it returns redirect metadata and consumes the transient so the notice shows once.

Reference

Path parameters

Typed options, defaults, and constraints in one scannable reference.
1 field
post_id number required
Post that may have received a slug-change redirect.

Response (example when present): { hasRedirect, redirectId, fromUrl, toUrl, deleteUrl }

DELETE /redirect/{id}

Removes the redirect post created for a slug change (undo).

POST /qr-attachment/{post_id}

Reference

Body parameters

Typed options, defaults, and constraints in one scannable reference.
2 fields
image_data string required
Base64-encoded PNG (data URI or raw base64).
force boolean
Regenerate and replace an existing QR attachment.

POST /gsc-inspect/{id}

Forces inspect-and-cache for the post. Requires edit_post on {id}.

Was this helpful?