Make an FAQ action from picked entries
POST
/sites/{siteId}/pages/{pageId}/faq-suggest/action- Berechtigung
actions:apply- MCP-Tool
faq_action
Make an FAQ action from picked entries Turns picked entries of the suggested FAQ into an action for this page: the FAQ block (questions as headings, answers under them) and its FAQPage markup, built from the very same text so the markup matches what the page shows. Picking again replaces the draft of the open action. Nothing is written to the website: add the block, publish, then mark the action done.
Die Beschreibungen kommen aus dem OpenAPI-Dokument und sind auf Englisch.
Parameter
| Name | Ort | Details |
|---|---|---|
siteIdPflicht | Pfad | stringWebsite id, from GET /sites. |
pageIdPflicht | Pfad | stringPage id, from GET /pages or GET /pages/findings. |
Anfrage (Body)
| Feld | Details |
|---|---|
picks | list of integer · required; at most 8 items; suggestedFaq indexes to include |
heading | string · at most 120 characters; The block's heading; default "Frequently asked questions" |
{
"picks": [
0,
1
],
"heading": "Sizing questions"
}Antwort
200 · application/json
| Feld | Details |
|---|---|
action | object · required |
action.id | string · required |
action.created | true or false · required; False when an open FAQ action for this page was updated |
action.rule | string · required; FAQ-ADD-001 |
action.link | address (URL) · required |
html | string · required; The FAQ block |
jsonLd | string · required; The FAQPage markup, as a script element |
Fehler
| Status | Bedeutung |
|---|---|
400 | Bad request. Codes: missing_argument, bad_pick, bad_heading. |
401 | Missing, unknown or revoked key. Codes: missing_key, invalid_key. |
403 | The key lacks the scope, covers another website, or its owner lost access. Codes: missing_scope, other_site, owner_left, no_owner, forbidden. |
404 | Not found. Codes: not_found. |
409 | Conflict with the current state. Codes: not_run. |
429 | Too 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 '{"picks":[0,1],"heading":"Sizing questions"}' \
"https://app.monoranks.com/api/v1/sites/SITE_ID/pages/PAGE_ID/faq-suggest/action"const res = await fetch("https://app.monoranks.com/api/v1/sites/SITE_ID/pages/PAGE_ID/faq-suggest/action", {
method: "POST",
headers: { Authorization: "Bearer mr_ws_…", "Content-Type": "application/json" },
body: JSON.stringify({
"picks": [
0,
1
],
"heading": "Sizing questions"
}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();import requests
res = requests.post(
"https://app.monoranks.com/api/v1/sites/SITE_ID/pages/PAGE_ID/faq-suggest/action",
headers={"Authorization": "Bearer mr_ws_…"},
json={
"picks": [
0,
1,
],
"heading": "Sizing questions",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://app.monoranks.com/api/v1/sites/SITE_ID/pages/PAGE_ID/faq-suggest/action");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => ["Authorization: Bearer mr_ws_…", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{"picks":[0,1],"heading":"Sizing questions"}',
CURLOPT_RETURNTRANSFER => true,
]);
$data = json_decode(curl_exec($ch), true);import axios from "axios";
const { data } = await axios.post(
"https://app.monoranks.com/api/v1/sites/SITE_ID/pages/PAGE_ID/faq-suggest/action",
{
"picks": [
0,
1
],
"heading": "Sizing questions"
},
{ headers: { Authorization: "Bearer mr_ws_…" } },
);Beispielantwort
{
"action": {
"id": "b2e4c6a8-1d3f-4a5b-9c7d-0e2f4a6b8c1d",
"created": true,
"rule": "FAQ-ADD-001",
"link": "https://app.monoranks.com/sites/3f6c2a1e-8b4d-4c7a-9e21-5d0b7a6f4c13/actions/b2e4c6a8-1d3f-4a5b-9c7d-0e2f4a6b8c1d"
},
"html": "<section class=\"faq\">\n <h2>Sizing questions</h2>\n <h3>How do I know what size trail bike I need?</h3>\n <p>Start from your height: riders from 170 to 180 cm usually fit a size M frame.</p>\n</section>",
"jsonLd": "<script type=\"application/ld+json\">\n{\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"How do I know what size trail bike I need?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Start from your height: riders from 170 to 180 cm usually fit a size M frame.\"}}]}\n</script>"
}{
"error": {
"code": "missing_argument",
"message": "page_id or url is required."
}
}{
"error": {
"code": "missing_key",
"message": "Send the key as Authorization: Bearer mr_site_…"
}
}{
"error": {
"code": "missing_scope",
"message": "This key does not have the scope this call needs."
}
}{
"error": {
"code": "not_found",
"message": "Page not found. Use a page_id from page_findings or list_pages, or the exact crawled url."
}
}{
"error": {
"code": "not_run",
"message": "Run the FAQ suggestion for this page first."
}
}{
"error": {
"code": "rate_limited",
"message": "More than 1200 requests this hour for this key."
}
}Der MCP-Server macht dasselbe mit dem Tool faq_action.