API reference
Site protocol
Endpoints a connected website calls with its site key. Read the site protocol guide for the order of calls.
Building an integration? Start with the site protocol guide.
Get this site's connection
GET/siteThe connected site, its project, sync settings and plan limits. The plugin calls this when it starts a sync.
curl https://semanticson.com/api/v1/site \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY"Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Disconnect this site
POST/site/disconnectCalled when the site owner disconnects from the site's admin. Revokes this site key, cancels changes waiting for approval and frees the plan's website slot. Synced pages and history are kept; reconnecting starts a new connection.
Accepts an Idempotency-Key header for safe retries.
No request body. Send an empty body or {}.
curl -X POST https://semanticson.com/api/v1/site/disconnect \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY"Response · 204 No Content
Success returns an empty body (204) or a small confirmation object.
Errors use the standard error object.
Report site details
POST/site/heartbeatTells SemanticsOn which versions the site runs and which kinds of change it can apply.
Accepts an Idempotency-Key header for safe retries.
Request body
pluginVersionstringoptionalat most 40 characters
platformVersionstringoptionalat most 40 characters
phpVersionstringoptionalat most 40 characters
seoPluginstringoptionalOne of:
yoast,rankmath,seopress,aioseo,ranklooks,nonecapabilitiesarray of stringsoptionalKnown capabilities: posts, meta, schema, redirects, links, noindex, delete, terms, media, social, products. Unknown values are ignored.
at most 50 items
siteNamestringoptionalat most 120 characters
approvalInstringoptionalWhere changes may be approved:
wordpress(only in the site's admin, default) orboth(also in SemanticsOn and the API). Only the site sets this.One of:
wordpress,both
curl -X POST https://semanticson.com/api/v1/site/heartbeat \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY" \
-H "Content-Type: application/json" \
-d '{
"pluginVersion": "1.1.0",
"platformVersion": "6.8",
"phpVersion": "8.2",
"seoPlugin": "yoast",
"capabilities": [
"posts",
"meta",
"schema",
"redirects",
"links",
"noindex",
"delete",
"terms",
"media",
"social",
"products"
],
"siteName": "Example blog",
"approvalIn": "wordpress"
}'Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Start a full sync
POST/site/syncReturns a syncId. Send every page (POST /site/pages), redirect (POST /site/redirects), term (POST /site/terms) and media item (POST /site/media) in batches, then call POST /site/sync/{syncId}/finish: items not sent during the sync are removed — but only from collections the site sent at least one batch of during this sync (an empty batch counts). Pages are always cleaned up.
Accepts an Idempotency-Key header for safe retries.
No request body. Send an empty body or {}.
curl -X POST https://semanticson.com/api/v1/site/sync \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY"Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Send pages
POST/site/pagesCreates or updates up to 100 pages (any post type, including product). Use it for full syncs (in batches) and whenever a post is saved. Panel fields (content, excerpt, focusKeyword, social fields, categories, tags, terms, featuredImage, jsonld, product, …) are left unchanged when omitted.
Accepts an Idempotency-Key header for safe retries.
Request body
pagesarray of objectsrequired1–100 items
pages[].externalIdstringrequired1–64 characters
pages[].typestringrequired1–40 characters
pages[].statusstringrequired1–20 characters
pages[].urlstringrequired1–2,000 characters
pages[].titlestringoptionalat most 1,000 characters · default ""
pages[].slugstringoptionalat most 500 characters · default ""
pages[].metaTitlestringoptionalat most 1,000 characters · default ""
pages[].metaDescriptionstringoptionalat most 2,000 characters · default ""
pages[].noindexbooleanoptionaldefault false
pages[].canonicalstringoptionalat most 2,000 characters · default ""
pages[].h1array of stringsoptionalat most 20 items · default []
pages[].headingsarray of objectsoptionalat most 300 items · default []
pages[].headings[].levelintegerrequired1–6
pages[].headings[].textstringrequiredat most 500 characters
pages[].internalLinksarray of objectsoptionalat most 2,000 items · default []
pages[].internalLinks[].hrefstringrequiredat most 2,000 characters
pages[].internalLinks[].textstringoptionalat most 500 characters · default ""
pages[].internalLinks[].targetIdstring or nulloptionalat most 64 characters
pages[].externalLinkCountintegeroptional0–9,007,199,254,740,991 · default 0
pages[].imageCountintegeroptional0–9,007,199,254,740,991 · default 0
pages[].imagesWithoutAltintegeroptional0–9,007,199,254,740,991 · default 0
pages[].schemaTypesarray of stringsoptionalat most 50 items · default []
pages[].wordCountintegeroptional0–9,007,199,254,740,991 · default 0
pages[].textstringoptionalat most 200,000 characters · default ""
pages[].authorstringoptionalat most 200 characters · default ""
pages[].publishedAtany or nulloptionalpages[].modifiedAtany or nulloptionalpages[].contentHashstringoptionalat most 100 characters · default ""
pages[].contentstringoptionalRaw post content (HTML) the panel editor loads
at most 1,000,000 characters
pages[].excerptstringoptionalat most 10,000 characters
pages[].focusKeywordstringoptionalat most 500 characters
pages[].nofollowbooleanoptionalpages[].ogTitlestringoptionalat most 1,000 characters
pages[].ogDescriptionstringoptionalat most 2,000 characters
pages[].ogImagestringoptionalat most 2,000 characters
pages[].twitterTitlestringoptionalat most 1,000 characters
pages[].twitterDescriptionstringoptionalat most 2,000 characters
pages[].categoriesarray of objectsoptionalat most 500 items
pages[].categories[].idstringrequiredat most 64 characters
pages[].categories[].namestringoptionalat most 200 characters · default ""
pages[].tagsarray of objectsoptionalat most 1,000 items
pages[].tags[].idstringrequiredat most 64 characters
pages[].tags[].namestringoptionalat most 200 characters · default ""
pages[].termsobjectoptionalEvery taxonomy: { [taxonomy]: [{ id, name }] }
pages[].featuredImageobject or nulloptionalpages[].featuredImage.mediaIdstring or nulloptionalat most 64 characters
pages[].featuredImage.urlstringoptionalat most 2,000 characters · default ""
pages[].featuredImage.altstringoptionalat most 1,000 characters · default ""
pages[].seoPluginstringoptionalat most 40 characters
pages[].editUrlstringoptionalat most 2,000 characters
pages[].jsonldany or nulloptionalpages[].resolvedTitlestringoptionalat most 1,000 characters
pages[].resolvedDescriptionstringoptionalat most 2,000 characters
pages[].productobject or nulloptionalpages[].product.productTypestringoptionalat most 40 characters
pages[].product.skustringoptionalat most 200 characters
pages[].product.regularPricestringoptionalat most 40 characters
pages[].product.salePricestringoptionalat most 40 characters
pages[].product.saleFromstring or nulloptionalat most 40 characters
pages[].product.saleTostring or nulloptionalat most 40 characters
pages[].product.currencystringoptionalat most 10 characters
pages[].product.stockStatusstringoptionalat most 40 characters
pages[].product.manageStockbooleanoptionalpages[].product.stockQuantityinteger or nulloptional-9,007,199,254,740,991–9,007,199,254,740,991
pages[].product.weightstringoptionalat most 40 characters
pages[].product.lengthstringoptionalat most 40 characters
pages[].product.widthstringoptionalat most 40 characters
pages[].product.heightstringoptionalat most 40 characters
pages[].product.shortDescriptionstringoptionalat most 100,000 characters
pages[].product.galleryImagesarray of objectsoptionalat most 100 items
pages[].product.galleryImages[].mediaIdstring or nulloptionalat most 64 characters
pages[].product.galleryImages[].urlstringoptionalat most 2,000 characters · default ""
pages[].product.galleryImages[].altstringoptionalat most 1,000 characters · default ""
pages[].product.externalUrlstringoptionalat most 2,000 characters
pages[].product.buttonTextstringoptionalat most 200 characters
pages[].product.featuredbooleanoptionalpages[].product.catalogVisibilitystringoptionalat most 40 characters
pages[].product.attributesarray of objectsoptionalat most 100 items
pages[].product.attributes[].namestringrequiredat most 200 characters
pages[].product.attributes[].optionsarray of stringsoptionalat most 500 items · default []
pages[].product.attributes[].visiblebooleanoptionaldefault true
pages[].product.attributes[].variationbooleanoptionaldefault false
pages[].product.variationsarray of objectsoptionalat most 1,000 items
pages[].product.variations[].variationIdstringrequired1–64 characters
pages[].product.variations[].skustringoptionalat most 200 characters · default ""
pages[].product.variations[].attributesobjectoptionaldefault {}
pages[].product.variations[].regularPricestringoptionalat most 40 characters · default ""
pages[].product.variations[].salePricestringoptionalat most 40 characters · default ""
pages[].product.variations[].stockStatusstringoptionalat most 40 characters · default ""
pages[].product.variations[].stockQuantityinteger or nulloptional-9,007,199,254,740,991–9,007,199,254,740,991
pages[].product.variations[].manageStockbooleanoptionalpages[].product.variations[].imageIdstring or nulloptionalat most 64 characters
curl -X POST https://semanticson.com/api/v1/site/pages \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY" \
-H "Content-Type: application/json" \
-d '{
"pages": [
{
"externalId": "42",
"type": "post",
"status": "publish",
"url": "https://example.com/espresso-guide",
"title": "Espresso guide",
"slug": "espresso-guide",
"metaTitle": "Espresso guide — Example",
"metaDescription": "How to pull a balanced shot.",
"noindex": false,
"h1": [],
"headings": [
{
"level": 2,
"text": "Grind size"
}
],
"internalLinks": [
{
"href": "https://example.com/grinders",
"text": "grinders",
"targetId": "17"
}
],
"externalLinkCount": 2,
"imageCount": 3,
"imagesWithoutAlt": 0,
"schemaTypes": [
"Article"
],
"wordCount": 1200,
"text": "Plain text of the post…",
"author": "Jane",
"publishedAt": "2026-10-01T09:00:00Z",
"modifiedAt": "2026-11-20T10:15:00Z",
"contentHash": "5d41402abc4b2a76b9719d911017c592",
"content": "<p>Plain text of the post…</p>",
"excerpt": "",
"focusKeyword": "espresso guide",
"nofollow": false,
"ogTitle": "",
"ogDescription": "",
"ogImage": "",
"twitterTitle": "",
"twitterDescription": "",
"categories": [
{
"id": "3",
"name": "Coffee"
}
],
"tags": [
{
"id": "8",
"name": "espresso"
}
],
"terms": {
"category": [
{
"id": "3",
"name": "Coffee"
}
],
"post_tag": [
{
"id": "8",
"name": "espresso"
}
]
},
"featuredImage": {
"mediaId": "77",
"url": "https://example.com/wp-content/uploads/shot.jpg",
"alt": "Espresso shot"
},
"seoPlugin": "yoast",
"editUrl": "https://example.com/wp-admin/post.php?post=42&action=edit",
"jsonld": null,
"resolvedTitle": "Espresso guide — Example",
"resolvedDescription": "How to pull a balanced shot.",
"product": null
}
]
}'Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Send redirects
POST/site/redirectsCreates or updates up to 500 redirects. Use it for full syncs (in batches; send { "redirects": [] } when the site has none so stale ones are removed) and after any redirect change.
Accepts an Idempotency-Key header for safe retries.
Request body
redirectsarray of objectsrequiredat most 500 items
redirects[].redirectIdstringrequired1–64 characters
redirects[].fromstringrequired1–2,000 characters
redirects[].tostringoptionalat most 2,000 characters · default ""
redirects[].codeintegeroptional300–599 · default 301
redirects[].hitsintegeroptional0–9,007,199,254,740,991 · default 0
redirects[].lastHitAtany or nulloptionalredirects[].sourcestringoptionalOne of:
semanticson,manualdefault "manual"
curl -X POST https://semanticson.com/api/v1/site/redirects \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY" \
-H "Content-Type: application/json" \
-d '{
"redirects": [
{
"redirectId": "r_12",
"from": "/old-espresso",
"to": "https://example.com/espresso-guide",
"code": 301,
"hits": 14,
"lastHitAt": "2026-11-28T08:00:00Z",
"source": "semanticson"
}
]
}'Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Send categories, tags and other terms
POST/site/termsCreates or updates up to 500 terms of any public taxonomy (category, post_tag, product_cat, custom ones).
Accepts an Idempotency-Key header for safe retries.
Request body
termsarray of objectsrequiredat most 500 items
terms[].termIdstringrequired1–64 characters
terms[].taxonomystringrequired1–64 characters · pattern ^[A-Za-z0-9_-]+$
terms[].namestringoptionalat most 500 characters · default ""
terms[].slugstringoptionalat most 500 characters · default ""
terms[].descriptionstringoptionalat most 20,000 characters · default ""
terms[].parentIdstring or nulloptionalat most 64 characters
terms[].countintegeroptional0–9,007,199,254,740,991 · default 0
terms[].urlstringoptionalat most 2,000 characters · default ""
terms[].metaTitlestringoptionalat most 1,000 characters · default ""
terms[].metaDescriptionstringoptionalat most 2,000 characters · default ""
terms[].noindexbooleanoptionaldefault false
curl -X POST https://semanticson.com/api/v1/site/terms \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY" \
-H "Content-Type: application/json" \
-d '{
"terms": [
{
"termId": "3",
"taxonomy": "category",
"name": "Coffee",
"slug": "coffee",
"description": "",
"parentId": null,
"count": 12,
"url": "https://example.com/category/coffee",
"metaTitle": "",
"metaDescription": "",
"noindex": false
}
]
}'Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Send media library items
POST/site/mediaCreates or updates up to 200 media items (attachments).
Accepts an Idempotency-Key header for safe retries.
Request body
mediaarray of objectsrequiredat most 200 items
media[].mediaIdstringrequired1–64 characters
media[].urlstringrequired1–2,000 characters
media[].titlestringoptionalat most 1,000 characters · default ""
media[].altstringoptionalat most 2,000 characters · default ""
media[].captionstringoptionalat most 5,000 characters · default ""
media[].descriptionstringoptionalat most 20,000 characters
media[].mimeTypestringoptionalat most 200 characters · default ""
media[].widthinteger or nulloptional0–9,007,199,254,740,991
media[].heightinteger or nulloptional0–9,007,199,254,740,991
media[].filesizeinteger or nulloptional0–9,007,199,254,740,991
media[].attachedTostring or nulloptionalat most 64 characters
media[].createdAtany or nulloptional
curl -X POST https://semanticson.com/api/v1/site/media \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY" \
-H "Content-Type: application/json" \
-d '{
"media": [
{
"mediaId": "77",
"url": "https://example.com/wp-content/uploads/shot.jpg",
"title": "Espresso shot",
"alt": "",
"caption": "",
"mimeType": "image/jpeg",
"width": 1600,
"height": 1067,
"filesize": 182044,
"attachedTo": "42",
"createdAt": "2026-10-01T09:00:00Z"
}
]
}'Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Finish a full sync
POST/site/sync/{syncId}/finishRemoves items not sent since syncId from every collection the site sent during this sync (pages always). Returns removed/pageCount for pages and per-collection collections (null = collection not sent, left untouched).
Accepts an Idempotency-Key header for safe retries.
Path parameters
syncIdstringrequiredat most 40 characters
No request body. Send an empty body or {}.
curl -X POST https://semanticson.com/api/v1/site/sync/SYNC_ID/finish \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY"Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Remove a page
DELETE/site/pages/{externalId}Call when a post is deleted or trashed.
Accepts an Idempotency-Key header for safe retries.
Path parameters
externalIdstringrequiredat most 64 characters
curl -X DELETE https://semanticson.com/api/v1/site/pages/EXTERNAL_ID \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY"Response · 204 No Content or 200 OK
Success returns an empty body (204) or a small confirmation object.
Errors use the standard error object.
Remove a redirect
DELETE/site/redirects/{redirectId}Accepts an Idempotency-Key header for safe retries.
Path parameters
redirectIdstringrequiredat most 64 characters
curl -X DELETE https://semanticson.com/api/v1/site/redirects/REDIRECT_ID \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY"Response · 204 No Content or 200 OK
Success returns an empty body (204) or a small confirmation object.
Errors use the standard error object.
Remove a term
DELETE/site/terms/{taxonomy}/{termId}Accepts an Idempotency-Key header for safe retries.
Path parameters
taxonomystringrequired1–64 characters · pattern ^[A-Za-z0-9_-]+$
termIdstringrequiredat most 64 characters
curl -X DELETE https://semanticson.com/api/v1/site/terms/TAXONOMY/TERM_ID \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY"Response · 204 No Content or 200 OK
Success returns an empty body (204) or a small confirmation object.
Errors use the standard error object.
Remove a media item
DELETE/site/media/{mediaId}Accepts an Idempotency-Key header for safe retries.
Path parameters
mediaIdstringrequiredat most 64 characters
curl -X DELETE https://semanticson.com/api/v1/site/media/MEDIA_ID \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY"Response · 204 No Content or 200 OK
Success returns an empty body (204) or a small confirmation object.
Errors use the standard error object.
Changes for this site
GET/site/changespending changes to show for approval, approved changes to apply now, revert: applied changes whose undo is approved — undo them now, and revertRequested: undo requests waiting for approval in the site admin (revertNeedsApproval: true; approve with POST /site/changes/{id}/approve before undoing, or reject). Apply only approved changes.
Query parameters
includestringoptionalComma-separated: pending, approved, revert, revertRequested, history
default "pending,approved,revert,revertRequested"
curl https://semanticson.com/api/v1/site/changes \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY"Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Approve a change from the site admin
POST/site/changes/{changeId}/approveCall only when a person with permission clicks Approve in the site's admin. Never call it automatically. On a pending change it approves the change; on an applied change with revertNeedsApproval it approves the undo (then perform the undo and report /reverted).
Accepts an Idempotency-Key header for safe retries.
Path parameters
changeIdstringrequired
Request body
actorobjectoptionalThe person in the site admin who made the decision (recorded in the activity log)
actor.namestringoptionalat most 120 characters
actor.emailstringoptionalat most 200 characters
curl -X POST https://semanticson.com/api/v1/site/changes/CHANGE_ID/approve \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY" \
-H "Content-Type: application/json" \
-d '{
"actor": {
"name": "Jane Admin",
"email": "jane@example.com"
}
}'Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Reject a change from the site admin
POST/site/changes/{changeId}/rejectOn a pending change it rejects the change; on an applied change with revertNeedsApproval it rejects the undo request (the change stays applied and the reason is recorded in error).
Accepts an Idempotency-Key header for safe retries.
Path parameters
changeIdstringrequired
Request body
actorobjectoptionalThe person in the site admin who made the decision (recorded in the activity log)
actor.namestringoptionalat most 120 characters
actor.emailstringoptionalat most 200 characters
reasonstringoptionalat most 500 characters
curl -X POST https://semanticson.com/api/v1/site/changes/CHANGE_ID/reject \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY" \
-H "Content-Type: application/json" \
-d '{
"actor": {
"name": "Jane Admin"
},
"reason": "We keep the current title for now."
}'Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Report the outcome of applying a change
POST/site/changes/{changeId}/resultSend previous (the values before the change) so the change can be shown as a diff and undone later.
Accepts an Idempotency-Key header for safe retries.
Path parameters
changeIdstringrequired
Request body
statusstringrequiredOne of:
applied,failedpreviousobjectoptionalresultobjectoptionalerrorstringoptionalat most 1,000 characters
curl -X POST https://semanticson.com/api/v1/site/changes/CHANGE_ID/result \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "applied",
"previous": {
"metaDescription": "Old description"
},
"result": {
"postId": 42,
"editUrl": "https://example.com/wp-admin/post.php?post=42&action=edit",
"permalink": "https://example.com/espresso-guide"
}
}'Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Report that a change was undone
POST/site/changes/{changeId}/revertedCall after restoring the previous values — either because a revert was requested, or because a person clicked Undo in the site admin.
Accepts an Idempotency-Key header for safe retries.
Path parameters
changeIdstringrequired
Request body
okbooleanoptionaldefault true
errorstringoptionalat most 1,000 characters
resultobjectoptionalWhat the undo produced, when it created something new — e.g.
{ termId }after recreating a deleted termactorobjectoptionalThe person in the site admin who made the decision (recorded in the activity log)
actor.namestringoptionalat most 120 characters
actor.emailstringoptionalat most 200 characters
curl -X POST https://semanticson.com/api/v1/site/changes/CHANGE_ID/reverted \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY" \
-H "Content-Type: application/json" \
-d '{
"ok": true,
"actor": {
"name": "Jane Admin"
}
}'Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Everything SemanticsOn knows about one page
GET/site/pages/{externalId}/insightsOpen audit issues, changes waiting for approval, the content brief and keywords mapped to this page. Used by the plugin's editor sidebar.
Path parameters
externalIdstringrequiredat most 64 characters
curl https://semanticson.com/api/v1/site/pages/EXTERNAL_ID/insights \
-H "Authorization: Bearer $SEMANTICSON_SITE_KEY"Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.
Exchange a connect code for a site key
POST/connect/exchangeLast step of one-click connect. After the person approves the connection in SemanticsOn, the browser returns to the site with code; the site sends it here with the PKCE codeVerifier it generated and receives its site key and nudge secret. The code is single-use and expires after 10 minutes.
Request body
codestringrequired10–200 characters
codeVerifierstringrequired43–128 characters
siteUrlstringrequired4–500 characters
curl -X POST https://semanticson.com/api/v1/connect/exchange \
-H "Content-Type: application/json" \
-d '{
"code": "sco_3f9a…",
"codeVerifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
"siteUrl": "https://example.com"
}'Response · 200 OK
A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.
Errors use the standard error object.