مستندات توسعه دهندگان

Add a keyword to the action list

POST/sites/{siteId}/actions
Scope
actions:write

Add a keyword to the action list "Add to actions" on a Keywords or Keyword gaps row: a "New content" task, or "Improve page" when the website ranks on page 1–2. A keyword not in the list yet (a gap keyword) is added first, which uses one keyword lookup. One action per keyword: adding it again returns the action it has (200, created false), and a done or removed one is opened again. Recorded in the website's Activity as the key owner.

توضیح ها از سند OpenAPI می آیند و انگلیسی اند.

پارامترها

ناممحلتوضیح
siteIdاجباریpathstringWebsite id, from GET /sites.

بدنه درخواست

فیلدتوضیح
keywordstring · at most 120 characters; The keyword text
keyword_idstring · Or the keyword id, from GET /keywords
{
  "keyword": "tubeless gravel tires"
}

پاسخ

200 · application/json

فیلدتوضیح
createdtrue or false · required; True when the action was made now; false when the keyword already had one
actionobject · required
action.idstring · required; Action id (issueId), for GET /issues/{issueId} and remove
action.ruleIdKW-OPP-001 | KW-OPP-002 · required; KW-OPP-001: new content; KW-OPP-002: improve the page that ranks
action.titlestring · required; Action title
action.statusopen | in_progress | recheck_queued | resolved | ignored | reopened · required; Where the action stands
action.linkaddress (URL) · required; The action in the app
keywordobject · required
keyword.idstring · required; Keyword id
keyword.keywordstring · required; The search phrase
keyword.trackedtrue or false · required; Checked daily (starred)
keyword.addedToListtrue or false · required; True when this call added the keyword to the list (one lookup)

خطاها

کدمعنی
400Bad request. Codes: missing_keyword, bad_keyword, not_added.
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, keyword_not_found.
429Too many requests this hour for this key. Codes: rate_limited.

نمونه درخواست

curl -X POST \
  -H "Authorization: Bearer mr_ws_…" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"tubeless gravel tires"}' \
  "https://app.monoranks.com/api/v1/sites/SITE_ID/actions"

نمونه پاسخ

{
  "created": false,
  "action": {
    "id": "b2e4c6a8-1d3f-4a5b-9c7d-0e2f4a6b8c1d",
    "ruleId": "KW-OPP-001",
    "title": "New content: tubeless gravel tires",
    "status": "open",
    "link": "https://app.monoranks.com/sites/3f6c2a1e-8b4d-4c7a-9e21-5d0b7a6f4c13/actions/b2e4c6a8-1d3f-4a5b-9c7d-0e2f4a6b8c1d"
  },
  "keyword": {
    "id": "2d4f6b8d-0f2b-4d4f-9b6d-0f2b4d6f8b0d",
    "keyword": "tubeless gravel tires",
    "tracked": false,
    "addedToList": false
  }
}

سرور MCP همین کار را با ابزار add_keyword_to_actions انجام می دهد.