Skip to content

Connected sites

A connected site is a website linked to a SemanticsOn project. It sends all its content — pages, posts, products and other post types, redirects, categories and tags, and media — so it can be audited and edited in SemanticsOn, and it receives changes — but only changes a person has approved, by default in the website's own admin. This page explains the model; the site protocol covers the exact calls.

The model

ObjectWhat it is
siteOne website in one project: URL, platform (wordpress or custom), status (pending, connected, error, disconnected), sync settings and the capabilities it reported.
pageA post, page, product or other item the site synced, identified by its externalId (the ID on the website). Includes SEO and social fields, content, terms, featured image, structured data, product data, headings, links and word count. GET /sites/{siteId}/pages/{pageId}?include=content adds the raw HTML.
redirectA redirect on the website (redirectId, from, to, code, hits). GET /sites/{siteId}/redirects.
termA category, tag or other taxonomy term with its SEO fields. GET /sites/{siteId}/terms?taxonomy=.
mediaA media library item (mediaId, url, alt, title, caption, size). GET /sites/{siteId}/media?missingAlt=true.
changeOne proposed edit (kind, target page, payload) and its decision, outcome and undo history.
auditA check of the synced pages, with issues whose status is shared everywhere.

Connecting a website

WordPress: one click

Install the SemanticsOn Connect plugin and click Connect in its settings. The browser opens SemanticsOn, the person picks a project and approves, and the plugin receives its site key. No key is copied by hand. Any integration can use the same PKCE flow.

Any platform: POST /sites

Register the website with an account key that has sites:write. The response contains the site key, shown only once. Store it in your integration.

curl -X POST https://semanticson.com/api/v1/sites \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "PROJECT_ID",
  "url": "https://example.com",
  "name": "Example store",
  "platform": "custom",
  "settings": {
    "postTypes": [
      "product",
      "page"
    ],
    "includeDrafts": false
  }
}'
201 Created (abridged)
{
  "object": "site",
  "id": "SITE_ID",
  "projectId": "PROJECT_ID",
  "name": "Example store",
  "url": "https://example.com",
  "platform": "custom",
  "status": "connected",
  "capabilities": [],
  "settings": {
    "postTypes": [
      "product",
      "page"
    ],
    "includeDrafts": false,
    "syncIntervalMinutes": 15
  },
  "pageCount": 0,
  "siteKey": "so_site_…"
}

The address is normalised to scheme and host (plus path for subdirectory installs), lowercase, without a trailing slash. Connecting the same URL to the same project again reuses the site and issues a new key.

Connect with an account API key

An integration (the WordPress plugin included) can also connect with an account key the person pastes in: list projects with GET /projects, let the person choose one, then call POST /sites with { projectId, url, name, platform: "wordpress" } and store the returned siteKey and nudgeSecret encrypted. Use the site key for everything after that; the account key is not needed any more.

SituationResponse
New address201 with siteKey, nudgeSecret, reconnected: false. Counts towards the plan's website limit.
Same address already in this project (connected, pending or disconnected)200 with fresh siteKey and nudgeSecret, reconnected: true. The previous site key stops working; synced data and history are kept.
Same address connected to another of your projects409 site_exists, naming that project (details.projectId, details.projectName). Disconnect it there first.
Plan's website limit reached400 with the plan limit message (reconnecting an existing site is allowed).

Site keys

A site key (so_site_…) authenticates one website. It can call the site protocol endpoints and general read, tool and audit endpoints confined to the site's project (details). Site keys work on every plan and their requests do not count towards the monthly API allowance. Rotate a key with POST /sites/{siteId}/rotate-key or in the dashboard; disconnecting a site revokes its key and cancels its pending and approved changes.

Content sync

The site sends four collections: pages with POST /site/pages (batches of up to 100; every public post type, including WooCommerce products with their product data), redirects with POST /site/redirects (500), terms of every public taxonomy with POST /site/terms (500) and media with POST /site/media (200). A full sync is wrapped in POST /site/sync and POST /site/sync/{syncId}/finish; items not sent during a full sync are removed, so deleted content disappears — but only from collections the site sent during that sync, so an older integration that sends only pages keeps its other data. Between full syncs, the site sends single items whenever they change and calls the matching DELETE endpoint when one is deleted.

Sync settings live on the site and are read by the integration at the start of every sync (GET /site):

SettingDefaultMeaning
postTypes["*"]Content types to sync. "*" = every public post type (attachments and internal types excluded).
includeDraftstrueAlso sync drafts, pending and scheduled posts (audits flag stale drafts).
syncIntervalMinutes15How often the site checks for approved changes, 5–1440.

Change them in the dashboard or with PATCH /sites/{siteId}.

Change lifecycle

Nothing changes on a website until a person approves it

Every change is created as pending. Only an explicit decision by a person moves it to approved. By default (approvalIn: "wordpress") that happens only in the website's admin, e.g. the WordPress plugin's Approvals screen. If the website owner allows it in the plugin (approvalIn: "both"), people in SemanticsOn and POST /changes/{changeId}/approve (or approve: true) with a key that holds changes:approve may approve too. Websites apply only approved changes.

Lifecycle of a changeA change starts pending. A person approves, rejects or cancels it. The website applies an approved change, which becomes applied, or reports a failure, which becomes failed. A failed change can be approved again or rejected. An applied change can be undone and becomes reverted.person approvessite appliesundorejectwithdrawsite failsapprove againpendingapprovedappliedrevertedrejectedfailedcancelled
Only approved changes are handed to the website. A failed change can also be rejected. Withdrawing (cancel) is possible only while a change is pending.
StatusMeaningNext
pendingWaiting for a person.approve, reject, withdraw
approvedApproved; the website applies it on its next sync, usually within seconds when nudged.applied or failed (reported by the site)
appliedLive on the website. previous holds the values it replaced.undo
failedThe website could not apply it; error says why.approve again (retry) or reject
rejectedA person declined it.—
cancelledWithdrawn by the proposer, or the website was disconnected.—
revertedUndone: the website restored previous.—

Two people deciding at the same time cannot both win: the second gets an error and should refresh. Every decision is recorded with where it was made (decidedVia: dashboard, wordpress or api) and fires a webhook.

Change kinds

Payloads are validated when a change is proposed. A website that reported its capabilities only receives kinds it supports; proposing another kind fails with a clear message. Capabilities are posts, meta, schema, redirects, links, noindex, delete, terms, media, social, products. meta.update with Open Graph or Twitter fields also needs social, and product data (product on post.update/post.create) needs products. Changes that target a redirect, term, media item or product variation must refer to one the site has synced; post deletion needs a synced page. In payloads, a field that is absent is left untouched and "" clears it.

KindWhat it doesTargetPayload
meta.updateUpdate SEO fieldscapability metaexternalId
  • metaTitle string (at most 300 characters)
  • metaDescription string (at most 1,000 characters)
  • focusKeyword string (at most 200 characters)Comma-separated for SEO plugins that support several
  • canonical Absolute URL, or "" to clear
  • nofollow boolean
  • ogTitle string (at most 300 characters)Needs capability `social`
  • ogDescription string (at most 1,000 characters)Needs capability `social`
  • ogImage Image URL; needs capability `social`
  • twitterTitle string (at most 300 characters)Needs capability `social`
  • twitterDescription string (at most 1,000 characters)Needs capability `social`
post.updateUpdate a post or pagecapability postsexternalId
  • title string (at most 500 characters)
  • content string (at most 2,000,000 characters)
  • format html | markdown, default "html"
  • excerpt string (at most 5,000 characters)
  • slug string (at most 200 characters)
  • status draft | pending | publish | private | future
  • categories array of strings (at most 50 items)Category names; replaces the post's categories (missing ones are created)
  • tags array of strings (at most 100 items)Tag names; replaces the post's tags
  • terms object{ [taxonomy]: names[] } — replaces the post's terms in those taxonomies only (missing terms are created)
  • featuredImage object or null`{ mediaId }` (an item from the media sync), `{ url, alt? }` (imported into the media library) or `null` to remove
  • date string (pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$, format date-time)ISO 8601 date-time; with status `future` it must be in the future
  • product objectWooCommerce product fields (needs capability `products`)
post.createCreate a post or pagecapability postsnone
  • title string, required (1–500 characters)
  • content string, default "" (at most 2,000,000 characters)
  • format html | markdown, default "html"
  • type string, default "post" (at most 40 characters)
  • status draft | pending | publish | private | future, default "draft"
  • excerpt string (at most 5,000 characters)
  • slug string (at most 200 characters)
  • metaTitle string (at most 300 characters)
  • metaDescription string (at most 1,000 characters)
  • focusKeyword string (at most 200 characters)
  • canonical
  • noindex boolean
  • categories array of strings (at most 50 items)
  • tags array of strings (at most 100 items)
  • terms object{ [taxonomy]: names[] } — replaces the post's terms in those taxonomies only (missing terms are created)
  • featuredImage object or null`{ mediaId }` (an item from the media sync), `{ url, alt? }` (imported into the media library) or `null` to remove
  • date string (pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$, format date-time)ISO 8601 date-time; with status `future` it must be in the future
  • product objectProduct fields when `type` is `product` (needs capability `products`)
post.deleteMove a post or page to the trashcapability deleteexternalId
  • force boolean, default falseDelete permanently instead of moving to the trash (cannot be undone)
schema.setSet structured data (JSON-LD)capability schemaexternalId
  • jsonld object or array of objects or null, requiredJSON-LD object or array; replaces structured data previously set by SemanticsOn on this page. `null` removes it.
redirect.createCreate a redirectcapability redirectsnone
  • from string, required (1–500 characters, pattern ^\/)
  • to string, required (1–2,000 characters)
  • code 301 | 302 | 307 | 308, default 301
redirect.updateChange a redirectcapability redirectsredirectId
  • from string (1–500 characters, pattern ^\/)
  • to string (1–2,000 characters)
  • code 301 | 302 | 307 | 308
redirect.deleteDelete a redirectcapability redirectsredirectId
    term.createCreate a category or tagcapability termsnone
    • taxonomy string, required (1–64 characters, pattern ^[A-Za-z0-9_-]+$)Taxonomy name, e.g. category, post_tag, product_cat (one the site reported)
    • name string, required (1–200 characters)
    • slug string (at most 200 characters)
    • description string (at most 5,000 characters)
    • parentId string (at most 64 characters)Parent term ID in the same taxonomy (hierarchical taxonomies such as category, product_cat)
    • metaTitle string (at most 300 characters)
    • metaDescription string (at most 1,000 characters)
    term.updateUpdate a category or tagcapability termstaxonomytermId
    • name string (1–200 characters)
    • slug string (at most 200 characters)
    • description string (at most 5,000 characters)
    • parentId string (at most 64 characters)Parent term ID in the same taxonomy, or "" for none
    • metaTitle string (at most 300 characters)
    • metaDescription string (at most 1,000 characters)
    • noindex boolean
    term.deleteDelete a category or tagcapability termstaxonomytermId
      media.updateUpdate media details (alt text, title, caption)capability mediamediaId
      • alt string (at most 1,000 characters)
      • title string (at most 500 characters)
      • caption string (at most 2,000 characters)
      • description string (at most 5,000 characters)
      media.importImport an image into the media librarycapability medianone
      • url string, required (at most 2,000 characters, format uri)http(s) URL of the file to import
      • alt string (at most 1,000 characters)
      • title string (at most 500 characters)
      • attachTo string (at most 64 characters)externalId of the post to attach it to
      product.variation.updateUpdate a product variation (price, stock, SKU)capability productsexternalIdvariationId
      • sku string (at most 200 characters)
      • regularPrice string (at most 40 characters, pattern ^(\d+(\.\d+)?)?$)
      • salePrice string (at most 40 characters, pattern ^(\d+(\.\d+)?)?$)
      • stockStatus instock | outofstock | onbackorder
      • stockQuantity integer or null (-1,000,000–1,000,000,000)
      • manageStock boolean
      noindex.setChange search engine indexingcapability noindexexternalId
      • noindex boolean, required

      Post content (post.update, post.create) can be proposed as Markdown with format: "markdown"; it is converted to HTML before the website sees it, so sites always receive HTML. How a site applies and undoes each kind is described in the site protocol.

      Proposing changes

      Propose up to 50 changes at once with an account key that has sites:write. Link a change to an audit issue with auditResultId and the issue is marked fixed when the change is applied (and reopened if it is undone).

      curl -X POST https://semanticson.com/api/v1/sites/SITE_ID/changes \
        -H "Authorization: Bearer $SEMANTICSON_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
        "changes": [
          {
            "kind": "meta.update",
            "target": {
              "externalId": "42"
            },
            "payload": {
              "metaTitle": "Espresso grind size chart (2026)",
              "metaDescription": "Dial in espresso with a simple grind size chart for every brew method."
            }
          },
          {
            "kind": "link.insert",
            "target": {
              "externalId": "42"
            },
            "payload": {
              "anchorText": "burr grinder",
              "targetUrl": "https://example.com/best-burr-grinders"
            },
            "title": "Link to the grinder guide"
          }
        ]
      }'

      If any change in the request is invalid, none are created and error.details lists each problem by index. The owner is notified, the site is nudged so the change shows in its admin, and change.proposed fires.

      With "approve": true at the top level the changes are created approved (recorded as decided via api) and the site is nudged to apply them. This needs the changes:approve scope and a site with approvalIn: "both"; otherwise the answer is 403 approval_in_wordpress.

      Approving and undoing

      • In WordPress (always): the plugin's Approvals screen. The site reports approvalIn in its heartbeat; only the website owner can change it.
      • In SemanticsOn (only with approvalIn: "both"): the website's Changes tab.
      • Through the API (only with approvalIn: "both"): POST /changes/{changeId}/approve, scope changes:approve; otherwise 403 approval_in_wordpress. Build this only behind a button a person clicks.

      To undo an applied change call POST /changes/{changeId}/revert. With approvalIn: "wordpress" the undo request (revertNeedsApproval: true, webhook change.revert_requested) waits for approval in the website's admin, which may also reject it (the change stays applied, webhook change.revert_rejected). Once approved, the website restores the values it recorded in previous and reports back; the change becomes reverted. Changes applied without previous cannot be undone automatically.

      Audits from anywhere

      A site audit checks the synced pages, drafts included, and finishes immediately: missing or duplicate titles and meta descriptions, thin content, images without alt text, orphan pages, noindex and canonical settings, missing structured data, stale drafts and more. Start one from the dashboard, the API (POST /projects/{projectId}/audits with kind: "site") or WordPress. A crawl audit runs the Technical SEO Auditor against the live site instead.

      Issue status (open, fixed, ignored) is shared: an issue ignored in WordPress shows as ignored in the dashboard and the API, and stays ignored in later audits. Each issue carries the page's externalId, so integrations can show issues next to the right post.

      Scheduled audits and “what changed”

      Schedule audits daily, weekly, monthly with POST /projects/{projectId}/audit-schedules or in the dashboard. Every audit is compared with the previous audit of the same target: GET /audits/{auditId} returns changes with the previous score and the number of new and resolved issues, and audit.completed fires when it finishes.

      Nudges

      When something needs the website's attention — a change was proposed or approved, an undo was requested, settings changed, or someone clicked “Sync now” — SemanticsOn sends a small signed nudge so the site syncs straight away instead of waiting for its schedule. Nudges are best effort: sites must also sync on their own schedule. WordPress sites receive them automatically; other platforms receive them at the settings.nudgeUrl they configure, and otherwise poll. See verifying nudges.

      Plan limits

      Every plan can connect websites, up to its connected-website limit (plan.limits.connectedSites in GET /me; -1 is unlimited). Connecting beyond the limit is refused. After a downgrade the oldest websites keep working and the newest beyond the limit return site_limit_exceeded until one is disconnected or the plan is upgraded.