Custom routes under prc-content-transformer/v1.
Base path: /wp-json/prc-content-transformer/v1/
Auth summary
| Access | Routes |
|---|---|
edit_post on target post_id | /transform, /status, /result |
edit_posts | /providers |
POST /transform
Triggers a synchronous or async transformation.
Reference
4 fields
Request body
Typed options, defaults, and constraints in one scannable reference.
-
post_idnumber required -
Post to transform.
-
providerstring required -
Provider slug (plain-text, apple-news, email).
-
asyncboolean -
Queue via Action Scheduler when true.
-
forceboolean -
Bypass cache for a fresh transform.
No fields match this filter.
Sync responses return the transformation result array (status, output, provider, tokens_used, error). Async responses return queued / pending with optional job_id.
Errors include post_not_found (404), provider_not_found (400), scheduler_unavailable (500), and rest_forbidden (403).
Request
POST
/wp-json/prc-content-transformer/v1/transform
HeadersKey: value
Content-Type application/jsonAccept application/jsonRequest bodyJSON
{
"post_id": 123,
"provider": "plain-text",
"force": false
}
Response
200 OK
Response headers
Key: value
BodyJSON
{
"status": "success",
"output": "Transformed text…",
"provider": "plain-text"
}GET /status
Reference
2 fields
Query parameters
Typed options, defaults, and constraints in one scannable reference.
-
post_idnumber required -
Target post.
-
providerstring required -
Provider slug.
No fields match this filter.
Returns { post_id, provider, status } from the transformation cache.
GET /result
Same query parameters as /status. Returns the cached result array, or no_result (404) when nothing is cached.
GET /providers
Lists registered providers: name, slug, output_type, available.