Developer docs

Apply an action’s fixes

POST/sites/{siteId}/actions/{issueId}/apply
Scope
actions:apply
MCP tool
apply

Apply approved values through WordPress Approves new SEO titles, meta descriptions, canonicals or noindex for the pages of one action, writes them through the WordPress connector, then rechecks. The key owner is recorded as approver; undo is in the app for 30 days. A category or tag archive takes an SEO title or meta description when the WordPress plugin supports it; otherwise it is refused with not_writable and the reason. Image alt text and redirects are applied in the app only.

Parameters

NameInDetails
siteIdRequiredpathstringWebsite id, from GET /sites.
issueIdRequiredpathstringIssue id of the action, from GET /sites/{siteId}/actions.

Request body

FieldDetails
changeslist of object · required; at most 500 items; One change per page, at most 500
changes[].urlstring · required; A page the action lists, a published WordPress item synced to MonoRanks
changes[].valuestring · required; The new value; for noindex, 1 to set it and 0 to remove it
{
  "changes": [
    {
      "url": "https://acmebikes.com/products/trail-pro-29",
      "value": "Trail Pro 29: a light aluminium trail bike with 140 mm travel and a 12-speed drivetrain. Free delivery and 30-day returns."
    }
  ]
}

Response

200 · application/json

FieldDetails
approvedinteger · required; Changes approved
batchIdstring · required; Batch id; see lastChange of the issue
notestring · required; What happens next
linkstring · required; The action in the app

Notes

Send the values you approve to POST /sites/{siteId}/actions/{issueId}/apply as { "changes": [ { "url": "…", "value": "…" } ] } (at most 500). Through the API, apply writes SEO titles, meta descriptions, canonicals and noindex; image alt text and redirects are applied in the app.

Errors

StatusMeaning
400Bad request. Codes: field_not_supported, no_changes, not_a_wordpress_post, not_applied.
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.
422The request cannot be carried out. Codes: not_writable.
429Too many requests this hour for this key. Codes: rate_limited.

Example request

curl -X POST \
  -H "Authorization: Bearer mr_ws_…" \
  -H "Content-Type: application/json" \
  -d '{"changes":[{"url":"https://acmebikes.com/products/trail-pro-29","value":"Trail Pro 29: a light aluminium trail bike with 140 mm travel and a 12-speed drivetrain. Free delivery and 30-day returns."}]}' \
  "https://app.monoranks.com/api/v1/sites/SITE_ID/actions/ISSUE_ID/apply"

Example response

{
  "approved": 1,
  "batchId": "f6b8d0f2-4a6c-4e8a-ac2e-6a8cae2a4c6d",
  "note": "Written by the worker, then rechecked. Undo is available in the app for 30 days.",
  "link": "https://app.monoranks.com/sites/3f6c2a1e-8b4d-4c7a-9e21-5d0b7a6f4c13/actions/b2e4c6a8-1d3f-4a5b-9c7d-0e2f4a6b8c1d"
}

The MCP server does the same with the tool apply.