logo
Advanced2min read

REST API

Full REST API for external integrations, headless setups and custom workflows.

REST API

Schemafy exposes a complete REST API for developers who need to integrate with external tools or build custom workflows.

Available on: Business plan and above.

Base URL

text
https://yoursite.com/wp-json/schemafy/v1/

Authentication

All write endpoints require WordPress authentication:

  • Schema management: manage_options capability
  • Read access: edit_posts capability or public (for schemas-by-url)

Endpoints

EndpointMethodDescriptionAuth
`/schemas`GETList all schemas (paginated + filters)`edit_posts`
`/schemas`POSTCreate a new schema`manage_options`
`/schemas/{id}`GETGet schema by ID`edit_posts`
`/schemas/{id}`PUTUpdate existing schema`manage_options`
`/schemas/{id}`DELETEDelete schema`manage_options`
`/meta`GET/POSTMeta tag management by URL`manage_options`
`/social`GET/POSTSocial media tag management`manage_options`
`/scan`POSTTrigger auto-generation scan`manage_options`
`/validate`POSTValidate JSON-LD against Schema.org`edit_posts`
`/bulk`POSTBulk operations (fix, cleanup, duplicates)`manage_options`
`/schemas-by-url`GETSchemas assigned to a URLPublic

Code Examples

Get schemas for a URL

bash
curl -X GET "https://yoursite.com/wp-json/schemafy/v1/schemas-by-url?url=https://yoursite.com/my-page" \
  -H "Authorization: Basic BASE64_CREDENTIALS"

Create a schema via API

bash
curl -X POST "https://yoursite.com/wp-json/schemafy/v1/schemas" \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic BASE64_CREDENTIALS" \
  -d '{
    "url": "https://yoursite.com/my-page",
    "schema_type": "Article",
    "schema_name": "Homepage Article",
    "schema_data": "{\"@context\":\"https://schema.org\",\"@type\":\"Article\",\"headline\":\"My Article\"}"
  }'

Was this page helpful?