Documentación para desarrolladores

Aplicar las correcciones de una acción

POST/sites/{siteId}/actions/{issueId}/apply
Permiso
actions:apply
Herramienta MCP
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.

Las descripciones vienen del documento OpenAPI y están en inglés.

Parámetros

NombreDóndeDetalles
siteIdObligatoriorutastringWebsite id, from GET /sites.
issueIdObligatoriorutastringIssue id of the action, from GET /sites/{siteId}/actions.

Cuerpo de la petición

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

Respuesta

200 · application/json

CampoDetalles
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

Notas

Envía los valores que apruebes a POST /sites/{siteId}/actions/{issueId}/apply como { "changes": [ { "url": "…", "value": "…" } ] } (como máximo 500). Mediante la API, apply escribe títulos SEO, meta descripciones, canónicas y noindex; el texto alternativo de las imágenes y las redirecciones se aplican en la app.

Errores

EstadoSignificado
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.

Petición de ejemplo

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"

Respuesta de ejemplo

{
  "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"
}

El servidor MCP hace lo mismo con la herramienta apply.