Skip to content

API reference

Changes

Changes proposed for a connected website. Nothing is applied until a person approves it.

List changes for a site

GET/sites/{siteId}/changes

Path parameters

  • siteIdstringrequired

Query parameters

  • limitintegeroptional

    Items per page, 1–100.

    1–100 · default 25

  • cursorstringoptional

    Pass nextCursor from the previous page to get the next one.

    at most 200 characters

  • statusstringoptional

    Comma-separated: pending, approved, applied, failed, rejected, reverted, cancelled

curl https://semanticson.com/api/v1/sites/SITE_ID/changes \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 200 OK

A list object: { "object": "list", "data": [ … ], "hasMore": false, "nextCursor": null }. See pagination.

Errors use the standard error object.

Propose changes

POST/sites/{siteId}/changes

Proposes one or more changes for the website. Nothing is applied until a person approves each change — in the website's admin (always), or in SemanticsOn / with POST /changes/{changeId}/approve when the site allows it (approvalIn: "both"). Pass approve: true (needs the changes:approve scope and approvalIn: "both") to create them already approved; otherwise they are pending. A site with approvalIn: "wordpress" answers approve: true with 403 approval_in_wordpress. Each kind needs a capability the site reported (meta.update social fields also need social; product data needs products), and targets (redirectId, taxonomy+termId, mediaId, variationId) must exist in the synced data. Kinds: meta.update (Update SEO fields), post.update (Update a post or page), post.create (Create a post or page), post.delete (Move a post or page to the trash), schema.set (Set structured data (JSON-LD)), redirect.create (Create a redirect), redirect.update (Change a redirect), redirect.delete (Delete a redirect), term.create (Create a category or tag), term.update (Update a category or tag), term.delete (Delete a category or tag), media.update (Update media details (alt text, title, caption)), media.import (Import an image into the media library), product.variation.update (Update a product variation (price, stock, SKU)), link.insert (Add an internal link), noindex.set (Change search engine indexing).

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • siteIdstringrequired

Request body

  • changesarray of objectsrequired

    1–50 items

  • changes[].kindstringrequired

    One of: meta.update, post.update, post.create, post.delete, schema.set, redirect.create, redirect.update, redirect.delete, term.create, term.update, term.delete, media.update, media.import, product.variation.update, link.insert, noindex.set

  • changes[].titlestringoptional

    Short description shown to the approver

    at most 200 characters

  • changes[].targetobjectoptional

    default {}

  • changes[].payloadobjectoptional

    default {}

  • changes[].auditResultIdstringoptional

    Audit issue this change fixes; it is marked fixed when the change is applied

    at most 40 characters

  • changes[].sourceRefstringoptional

    at most 100 characters

  • approvebooleanoptional

    Create the changes already approved (needs scope changes:approve and a site with approvalIn: "both"). The site is nudged to apply them.

    default false

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."
      }
    }
  ]
}'

Response · 201 Created

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.

Get a change

GET/changes/{changeId}

Path parameters

  • changeIdstringrequired
Response fields Show 22 fields
  • object"change"
  • idstring
  • siteIdstring
  • projectIdstring
  • kindstring

    One of: meta.update, post.update, post.create, post.delete, schema.set, redirect.create, redirect.update, redirect.delete, term.create, term.update, term.delete, media.update, media.import, product.variation.update, link.insert, noindex.set

  • titlestring
  • statusstring

    One of: pending, approved, applied, failed, rejected, reverted, cancelled

  • targetobject
  • payloadobject
  • previousany or null
  • resultany or null
  • errorstring or null
  • sourcestring
  • auditResultIdstring or null
  • decidedViastring or null
  • decidedAtstring or null
  • appliedAtstring or null
  • revertRequestedboolean
  • revertNeedsApprovalboolean
  • revertedAtstring or null
  • createdAtstring
  • updatedAtstring
curl https://semanticson.com/api/v1/changes/CHANGE_ID \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 200 OK

A JSON object with the fields listed under Response fields.

Errors use the standard error object.

Approve a change

POST/changes/{changeId}/approve

Approves a pending (or failed) change. The website applies it on its next sync, usually within seconds. Requires the changes:approve scope, which is only in full-access keys by default, and a site that allows approving outside its admin (approvalIn: "both"); otherwise 403 approval_in_wordpress.

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • changeIdstringrequired

Request body

  • reasonstringoptional

    at most 500 characters

curl -X POST https://semanticson.com/api/v1/changes/CHANGE_ID/approve \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

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

POST/changes/{changeId}/reject

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • changeIdstringrequired

Request body

  • reasonstringoptional

    at most 500 characters

curl -X POST https://semanticson.com/api/v1/changes/CHANGE_ID/reject \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Not now — the page is being rewritten."
}'

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.

Withdraw a pending change

POST/changes/{changeId}/cancel

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • changeIdstringrequired

No request body. Send an empty body or {}.

curl -X POST https://semanticson.com/api/v1/changes/CHANGE_ID/cancel \
  -H "Authorization: Bearer $SEMANTICSON_API_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.

Undo an applied change

POST/changes/{changeId}/revert

Asks the website to restore the values it recorded before applying the change. With approvalIn: "wordpress" the undo request waits for approval in the site's admin (revertNeedsApproval: true); the site admin may also reject it (the change stays applied). The change becomes reverted once the site confirms.

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • changeIdstringrequired

No request body. Send an empty body or {}.

curl -X POST https://semanticson.com/api/v1/changes/CHANGE_ID/revert \
  -H "Authorization: Bearer $SEMANTICSON_API_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.