Entwicklerdokumentation

Apply a title or description to any page

POST/sites/{siteId}/pages/apply
Berechtigung
actions:apply
MCP-Tool
apply

Apply a title or description to any page Approves a new SEO title or meta description for any crawled page of a connected WordPress site, not only the pages of an action (for example the main page picked for a keyword), writes it through the WordPress connector, then rechecks. Recorded against the page and the keyword you send, not an action, so no action changes status. The key owner is recorded as approver; undo is in the app (Activity) for 30 days. A category or tag archive is written too when the WordPress plugin supports it (update the plugin otherwise); a page MonoRanks cannot write is refused with not_writable and the reason.

Die Beschreibungen kommen aus dem OpenAPI-Dokument und sind auf Englisch.

Parameter

NameOrtDetails
siteIdPflichtPfadstringWebsite id, from GET /sites.

Anfrage (Body)

FeldDetails
fieldseo_title | seo_description · required; The field to write
changeslist of object · required; at most 100 items; One change per page, at most 100
changes[].urlstring · required; A crawled page that is a published WordPress post, page or product synced to MonoRanks
changes[].valuestring · required; The new value
keywordstring · Optional: the keyword the page targets, recorded with the change
{
  "field": "seo_title",
  "keyword": "trail bikes",
  "changes": [
    {
      "url": "https://acmebikes.com/",
      "value": "Trail Bikes Built for Real Trails | Acme Bikes"
    }
  ]
}

Antwort

200 · application/json

FeldDetails
approvedinteger · required; Changes approved
batchIdstring · required; Batch id; the change shows in Activity
fieldseo_title | seo_description · required; The field written
keywordstring or null · required; The keyword recorded, or null
notestring · required; What happens next
linkstring · required; Activity in the app, where Undo is

Fehler

StatusBedeutung
400Bad request. Codes: field_not_supported, no_changes, no_change, too_many.
401Missing, unknown or revoked key. Codes: missing_key, invalid_key.
403The key lacks the scope, covers another website, or its owner lost access. Codes: missing_scope, other_site, owner_left, no_owner, forbidden.
404Not found. Codes: not_found, page_not_found.
409Conflict with the current state. Codes: not_connected, not_writable_site, seo_plugin.
422The request cannot be carried out. Codes: not_writable.
429Too many requests this hour for this key. Codes: rate_limited.

Beispielanfrage

curl -X POST \
  -H "Authorization: Bearer mr_ws_…" \
  -H "Content-Type: application/json" \
  -d '{"field":"seo_title","keyword":"trail bikes","changes":[{"url":"https://acmebikes.com/","value":"Trail Bikes Built for Real Trails | Acme Bikes"}]}' \
  "https://app.monoranks.com/api/v1/sites/SITE_ID/pages/apply"

Beispielantwort

{
  "approved": 1,
  "batchId": "f6b8d0f2-4a6c-4e8a-ac2e-6a8cae2a4c6d",
  "field": "seo_title",
  "keyword": "trail bikes",
  "note": "Written by the worker, then rechecked. A value the recheck does not find on the live page gets status not_live. Undo is available in the app (Activity) for 30 days.",
  "link": "https://app.monoranks.com/sites/3f6c2a1e-8b4d-4c7a-9e21-5d0b7a6f4c13/activity"
}

Der MCP-Server macht dasselbe mit dem Tool apply.