<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Enlighten with Amit</title><link>https://www.amitk.net/tags/agent-api/</link><description>Expert insights from a Solution Architect on enterprise digital strategy, microservices architecture, and modern headless solutions (Sitecore XM Cloud, Next.js). Focused on driving business impact through scalable technology.</description><image><url>https://www.amitk.net/images/amit-kumar.jpeg</url><title>Enlighten with Amit</title><link>https://www.amitk.net/</link></image><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>amit@amitk.net (Amit Kumar)</managingEditor><webMaster>amit@amitk.net (Amit Kumar)</webMaster><lastBuildDate>Tue, 20 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.amitk.net/tags/agent-api/index.xml" rel="self" type="application/rss+xml"/><item><title>SitecoreAI Layout Control in Marketer MCP &amp; Agent API: A Postman Guide</title><link>https://www.amitk.net/blog/sitecoreai-layout-control-marketer-mcp-agent-api/</link><pubDate>Tue, 20 Oct 2026 00:00:00 +0000</pubDate><author>amit@amitk.net (Amit Kumar)</author><guid>https://www.amitk.net/blog/sitecoreai-layout-control-marketer-mcp-agent-api/</guid><media:content url="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-agent-api-layout-control.gif" medium="image" type="image/gif"/><description>
Postman guide to the Oct 2026 SitecoreAI Marketer MCP and Agent API update: check referrers, place, move and remove components safely, and revert jobs.</description><content:encoded><![CDATA[







<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-quick-takeaway" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">💡 Quick Takeaway</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>


<p class="font-semibold text-lg text-example-color dark:text-gray-300">On October 12, 2026, Sitecore shipped Marketer MCP and Agent API improvements for SitecoreAI (Sitecore XM Cloud). Here is the short version:</p>
<ul>
<li>🎯 <span class="dark:text-gray-300 font-semibold gradient-text-aqua">Place components exactly where you want them:</span> add a component before or after an existing one instead of guessing at positions in SitecoreAI.</li>
<li>🔀 <span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">Move components:</span> reposition them within or across placeholders on the base page layout.</li>
<li>🔍 <span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Check references before you delete:</span> a referrers endpoint shows which pages and components use an item.</li>
<li>🧪 <span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">See what an A/B test is about to lose:</span> removals and deletions report the affected experiments back to you.</li>
<li>↩️ <span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">Remove orphaned components:</span> safely delete broken components that point to missing or non-existent datasource items.</li>
</ul>
<div class="callout info">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75.0 011.063.852l-.708 2.836a.75.75.0 001.063.853l.041-.021M21 12A9 9 0 113 12a9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"></path></svg><p>Verified against Sitecore's Agent API v2.0 reference</p>
    </div>
    <div class="callout-body">
        <p><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">Every endpoint, header and field name in this guide comes from Sitecore&rsquo;s published docs.</span>
<br/><br/>
Where the official docs stay quiet, this post speaks up. A prime example: deleting a component reports affected A/B tests rather than failing the call - meaning you need to inspect the response payload every single time.
<br/><br/>
The docs don&rsquo;t clearly explain which parameters are required to add or move components on a page, but this guide breaks down every single property and payload detail you need.</p>
    </div>
</div>
<hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-introduction-why-this-sitecoreai-update-matters" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">📊 Introduction: Why This SitecoreAI Update Matters</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>If you have been following my <a href="https://www.amitk.net/tags/mcp/" target="_blank" rel="noopener">Model Context Protocol series</a>
, you know the pattern. The Marketer MCP server is a thin, AI-friendly layer over the SitecoreAI Agent API. An agent picks a tool, the tool calls an endpoint, and the work happens in SitecoreAI under your existing permissions.</p>
<p>Creating new pages and adding components worked fine, but editing existing layouts felt clumsy. Where does the new component land? What breaks if I delete this datasource? And is someone running an A/B test on that banner? <br/><br/>
The <a href="https://developers.sitecore.com/changelog/sitecoreai/12102026/improved-content-management-and-page-layout-control-in-marketer-mcp-and-agent-api" target="_blank" rel="noopener">October 12 changelog</a>
 answers those questions with five tools:</p>
<ul>
<li><span class="dark:text-gray-300 font-semibold gradient-text-aqua">get_content_references</span></li>
<li><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">add_component_on_page</span></li>
<li><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">move_component_on_page</span></li>
<li><span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">remove_component_on_page</span></li>
<li><span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">delete_content</span></li>
</ul>
<p>I wanted to see the raw HTTP behind each one, because that tells you how these tools behave when an agent drives them at scale.</p>
<hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-background-and-architecture-overview" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">🧩 Background and Architecture Overview</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>Sitecore states that each Marketer MCP tool corresponds to an Agent API endpoint. The flow looks like this:</p>
<ol>
<li>You prompt an MCP client such as VS Code Copilot, Claude or Cursor.</li>
<li>The client picks a Marketer MCP tool.</li>
<li>The MCP server calls the Agent API on your behalf.</li>
<li>SitecoreAI applies its normal roles, approvals and audit rules.</li>
</ol>
<p>That is why Postman is such a good way to learn this. You see exactly what the tool will send, and you can test safely before you let an agent loose.</p>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>SitecoreAI MCP Tool</th><th>Agent API Endpoint</th><th>What To Watch</th></tr>
      </thead><tbody><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-aqua">get_content_references</span></td><td><code>GET /api/v1/content/{itemId}/referrers</code></td><td>You will need the <code>site</code> name, which you can grab directly from the site grouping item.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">add_component_on_page</span></td><td><code>POST /api/v1/pages/{pageId}/components</code></td><td>you can use either <code>insertBeforeComponentId</code> or <code>insertAfterComponentId</code>.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">move_component_on_page</span></td><td><code>PATCH /api/v1/pages/{pageId}/components/{componentInstanceId}/position</code></td><td>you can use either <code>insertBeforeComponentId</code> or <code>insertAfterComponentId</code>.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">remove_component_on_page</span></td><td><code>DELETE /api/v1/pages/{pageId}/components/{componentId}</code></td><td>Response lists <code>affectedExperiments</code>.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">delete_content</span></td><td><code>DELETE /api/v1/content/{itemId}</code></td><td><code>remove_references</code> and <code>affectedComponents</code> drive the cleanup.</td></tr></tbody>
  
</table>
</div>
<p>The base URL for every call in this guide is:</p>
<pre tabindex="0"><code>https://edge-platform.sitecorecloud.io/stream/ai-agent-api
</code></pre><hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-hands-on-postman-walkthrough-for-the-sitecoreai-agent-api" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">🧪 Hands-on Postman Walkthrough for the SitecoreAI Agent API</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h3 id="set-up-your-postman-collection" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Set Up Your Postman Collection</h3>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>Create a Postman environment with the variables below. Mark the secret as a secret-type variable, and never commit an exported environment.</p>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Variable</th><th>Example Value</th><th>Notes</th></tr>
      </thead><tbody><tr><td><span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">baseUrl</span></td><td><code>https://edge-platform.sitecorecloud.io/stream/ai-agent-api</code></td><td>Production Agent API server.</td></tr><tr><td><span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">client_id</span></td><td>Your automation client ID</td><td>From SitecoreAI Deploy.</td></tr><tr><td><span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">client_secret</span></td><td>Your automation client secret</td><td>Use a secret-type variable.</td></tr><tr><td><span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">siteName</span></td><td>Your SitecoreAI site name</td><td>Required by the referrers call.</td></tr><tr><td><span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">pageId</span>, <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">itemId</span>, <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">componentId</span></td><td>GUIDs from your tenant</td><td>Fetch them with the Sites and Pages endpoints.</td></tr></tbody>
  
</table>
</div>
<p>To create the client, open SitecoreAI Deploy in the Sitecore Cloud Portal, go to <strong>Credentials &gt; Environment &gt; Create credentials &gt; Automation</strong>, and copy the secret straight away, since you cannot view it again. You need to be an Organization Admin or Owner.</p>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h3 id="get-your-access-token-jwt" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Get Your Access Token (JWT)</h3>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#f1fa8c">&#39;https://auth.sitecorecloud.io/oauth/token&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  --header <span style="color:#f1fa8c">&#39;Content-Type: application/x-www-form-urlencoded&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  --data-urlencode <span style="color:#f1fa8c">&#39;client_id={YOUR_CLIENT_ID}&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  --data-urlencode <span style="color:#f1fa8c">&#39;client_secret={YOUR_CLIENT_SECRET}&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  --data-urlencode <span style="color:#f1fa8c">&#39;grant_type=client_credentials&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  --data-urlencode <span style="color:#f1fa8c">&#39;audience=https://api.sitecorecloud.io&#39;</span>
</span></span></code></pre></div><p>The response contains <code>access_token</code> and <code>expires_in: 86400</code>. Rather than copy and paste the token, drop this into the collection&rsquo;s <strong>Pre-request Script</strong> tab so Postman refreshes it for you:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#ff79c6">const</span> expiresAt <span style="color:#ff79c6">=</span> <span style="color:#8be9fd;font-style:italic">Number</span>(pm.collectionVariables.get(<span style="color:#f1fa8c">&#34;jwt_expires_at&#34;</span>) <span style="color:#ff79c6">||</span> <span style="color:#bd93f9">0</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#ff79c6">if</span> (<span style="color:#ff79c6">!</span>pm.collectionVariables.get(<span style="color:#f1fa8c">&#34;jwt&#34;</span>) <span style="color:#ff79c6">||</span> <span style="color:#8be9fd;font-style:italic">Date</span>.now() <span style="color:#ff79c6">&gt;</span> expiresAt) {
</span></span><span style="display:flex;"><span>  pm.sendRequest({
</span></span><span style="display:flex;"><span>    url<span style="color:#ff79c6">:</span> <span style="color:#f1fa8c">&#34;https://auth.sitecorecloud.io/oauth/token&#34;</span>,
</span></span><span style="display:flex;"><span>    method<span style="color:#ff79c6">:</span> <span style="color:#f1fa8c">&#34;POST&#34;</span>,
</span></span><span style="display:flex;"><span>    header<span style="color:#ff79c6">:</span> { <span style="color:#f1fa8c">&#34;Content-Type&#34;</span><span style="color:#ff79c6">:</span> <span style="color:#f1fa8c">&#34;application/x-www-form-urlencoded&#34;</span> },
</span></span><span style="display:flex;"><span>    body<span style="color:#ff79c6">:</span> {
</span></span><span style="display:flex;"><span>      mode<span style="color:#ff79c6">:</span> <span style="color:#f1fa8c">&#34;urlencoded&#34;</span>,
</span></span><span style="display:flex;"><span>      urlencoded<span style="color:#ff79c6">:</span> [
</span></span><span style="display:flex;"><span>        { key<span style="color:#ff79c6">:</span> <span style="color:#f1fa8c">&#34;client_id&#34;</span>, value<span style="color:#ff79c6">:</span> pm.environment.get(<span style="color:#f1fa8c">&#34;client_id&#34;</span>) },
</span></span><span style="display:flex;"><span>        { key<span style="color:#ff79c6">:</span> <span style="color:#f1fa8c">&#34;client_secret&#34;</span>, value<span style="color:#ff79c6">:</span> pm.environment.get(<span style="color:#f1fa8c">&#34;client_secret&#34;</span>) },
</span></span><span style="display:flex;"><span>        { key<span style="color:#ff79c6">:</span> <span style="color:#f1fa8c">&#34;grant_type&#34;</span>, value<span style="color:#ff79c6">:</span> <span style="color:#f1fa8c">&#34;client_credentials&#34;</span> },
</span></span><span style="display:flex;"><span>        { key<span style="color:#ff79c6">:</span> <span style="color:#f1fa8c">&#34;audience&#34;</span>, value<span style="color:#ff79c6">:</span> <span style="color:#f1fa8c">&#34;https://api.sitecorecloud.io&#34;</span> }
</span></span><span style="display:flex;"><span>      ]
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>  }, (err, res) =&gt; {
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">if</span> (err <span style="color:#ff79c6">||</span> res.code <span style="color:#ff79c6">!==</span> <span style="color:#bd93f9">200</span>) {
</span></span><span style="display:flex;"><span>      console.error(<span style="color:#f1fa8c">&#34;Token request failed&#34;</span>, err <span style="color:#ff79c6">||</span> res.text());
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">return</span>;
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">const</span> json <span style="color:#ff79c6">=</span> res.json();
</span></span><span style="display:flex;"><span>    pm.collectionVariables.set(<span style="color:#f1fa8c">&#34;jwt&#34;</span>, json.access_token);
</span></span><span style="display:flex;"><span>    <span style="color:#6272a4">// refresh 5 minutes early
</span></span></span><span style="display:flex;"><span>    pm.collectionVariables.set(<span style="color:#f1fa8c">&#34;jwt_expires_at&#34;</span>, <span style="color:#8be9fd;font-style:italic">Date</span>.now() <span style="color:#ff79c6">+</span> (json.expires_in <span style="color:#ff79c6">-</span> <span style="color:#bd93f9">300</span>) <span style="color:#ff79c6">*</span> <span style="color:#bd93f9">1000</span>);
</span></span><span style="display:flex;"><span>  });
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p>Set the collection <strong>Authorization</strong> type to Bearer Token with the value <code>{{jwt}}</code>.</p>
<div class="callout info">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75.0 011.063.852l-.708 2.836a.75.75.0 001.063.853l.041-.021M21 12A9 9 0 113 12a9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"></path></svg><p>Two things to set up in Postman: the token and the job ID</p>
    </div>
    <div class="callout-body">
        <p><span class="dark:text-gray-300 font-semibold gradient-text-aqua">1. Token: request it once, reuse it for 24 hours.</span>
<br/><br/>
The JWT from Sitecore Cloud is valid for 24 hours, and Sitecore recommends caching it instead of requesting a new one for every call. The pre-request script above does this for you. If you get a <code>401</code>, the token has expired, so request a new one.
<br/><br/>
<span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">2. Job ID: one label per logical change, so you get one undo.</span>
<br/><br/>
Create a <code>jobId</code> collection variable (for example <code>retire-fall-promo-2026</code>) and send <code>x-sc-job-id: {{jobId}}</code> on every call that changes content. Sitecore groups those calls into one job, so a single <code>POST /api/v1/jobs/{jobId}/revert</code> undoes them all and you can also then list what the job did (<code>GET /api/v1/jobs/{jobId}/operations</code>). Use a new ID for each unrelated task. Sitecore only specifies &ldquo;a unique identifier&rdquo;, so any unique string works.</p>
    </div>
</div>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h3 id="check-what-uses-a-content-item-getcontentreferences" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Check What Uses a Content Item (get_content_references)</h3>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>Check what depends on an item before you touch it.</p>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="see-it-in-sitecoreai" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">See It in SitecoreAI</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>Here, we check the inbound references for the datasource item named <strong>Text 1</strong> inside the SitecoreAI Content Tree:</p>


















  










  
  
    
    <img
      title="SitecoreAI Content Tree"
      loading="lazy"
      decoding="async"
      src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-agent-api-Inspect-References.PNG"
      alt="SitecoreAI Content Tree"
      class="img justify-self-center img-center img-lg  "
      width=""
      height="" />
  
  
















<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="try-it-in-postman" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Try It in Postman</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>To check the item references for the datasource named <strong>Text 1</strong> programmatically, execute the following GET request:</p>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Postman Property</th><th>Value</th></tr>
      </thead><tbody><tr><td><strong>HTTP Method</strong></td><td><code>GET</code></td></tr><tr><td><strong>Request URL</strong></td><td><code>{{baseUrl}}/api/v1/content/{{itemId}}/referrers</code></td></tr><tr><td><strong>Query Params</strong></td><td><code>site={{siteName}}</code> (required), <code>language=en</code></td></tr><tr><td><strong>Headers</strong></td><td><code>Authorization: Bearer {{jwt}}</code></td></tr></tbody>
  
</table>
</div>
<h6 id="postman-api-response-http-200-ok">Postman API Response (<code>HTTP 200 OK</code>):</h6>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;total_places&#34;</span>: <span style="color:#bd93f9">1</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;items&#34;</span>: [
</span></span><span style="display:flex;"><span>    {
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;id&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;name&#34;</span>: <span style="color:#f1fa8c">&#34;Home&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;path&#34;</span>: <span style="color:#f1fa8c">&#34;/sitecore/content/amitkumar/Contoso/Home&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;via&#34;</span>: <span style="color:#f1fa8c">&#34;__Final Renderings&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;kind&#34;</span>: <span style="color:#f1fa8c">&#34;page&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;page_item_id&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;page_url&#34;</span>: <span style="color:#f1fa8c">&#34;/&#34;</span>
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>  ]
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><div class="callout info">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75.0 011.063.852l-.708 2.836a.75.75.0 001.063.853l.041-.021M21 12A9 9 0 113 12a9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"></path></svg><p>Read total_places, and never treat null as zero</p>
    </div>
    <div class="callout-body">
        <p><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare"> <code>total_places</code> returns the complete count of references across the site, while <code>items</code> provides the actual array of referencing locations.</span>
<br/><br/>
A <code>null</code> means the server could not answer. It does not mean &ldquo;nothing references this&rdquo;, so never read it as safe to delete.</p>
    </div>
</div>
<p>







<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="try-it-with-marketer-mcp" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Try It with Marketer MCP</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div><br/>
When an AI assistant (such as Copilot Studio, Cursor, or VS Code) needs to check these dependencies, it invokes the corresponding get_content_references tool over JSON-RPC:</p>
<p><strong>Marketer MCP Tool Prompt:</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>#get_content_references provide the Text1 item references from the contoso site
</span></span></code></pre></div><p><strong>Marketer MCP Tool Response:</strong>


















  










  
  
    
    <img
      title="SitecoreAI Marketer MCP"
      loading="lazy"
      decoding="async"
      src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-get_content_references.PNG"
      alt="SitecoreAI Marketer MCP"
      class="img justify-self-center img-center img-lg  "
      width=""
      height="" />
  
  







</p>
<div class="callout tip">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="M15.362 5.214A8.252 8.252.0 0112 21 8.25 8.25.0 016.038 7.047 8.287 8.287.0 009 9.601a8.983 8.983.0 013.361-6.867 8.21 8.21.0 003 2.48z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 18a3.75 3.75.0 00.495-7.468 5.99 5.99.0 00-1.925 3.547 5.975 5.975.0 01-2.133-1.001A3.75 3.75.0 0012 18z"></path></svg><p>How They Work Together: MCP vs. Agent API</p>
    </div>
    <div class="callout-body">
        <p><span class="dark:text-gray-300 font-semibold gradient-text-aqua">Key Difference:</span> The <strong>Agent API</strong> gives you raw data for code and automation, while the <strong>Marketer MCP tool</strong> turns those details into a clear summary that an AI assistant can safely read and act on.</p>
    </div>
</div>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h3 id="add-a-component-before-or-after-another-addcomponentonpage" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Add a Component Before or After Another (add_component_on_page)</h3>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>Rather than appending renderings blindly to the end of a layout or manually calculating zero-based presentation indexes, the <span class="dark:text-gray-300 font-semibold gradient-text-aqua">add_component_on_page</span> operation inserts components relative to existing elements using deterministic spatial anchors (<code>before</code> or <code>after</code>).</p>
<h4 id="see-it-in-sitecoreai">See It in SitecoreAI</h4>
<p>Below is the current page structure in SitecoreAI before adding the new component:</p>


















  










  
  
    
    <img
      title="SitecoreAI Page Builder - Relative Positioning Context"
      loading="lazy"
      decoding="async"
      src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-add_component_on_page-1.PNG"
      alt="SitecoreAI Page Builder Component Positioning"
      class="img justify-self-center img-center img-md  "
      width=""
      height="" />
  
  








<p>To add a component relative to another item (<code>insertBeforeComponentId</code> or <code>insertAfterComponentId</code>), you must provide the target element&rsquo;s <strong>Component Instance ID</strong> (<code>id</code>). If this parameter is omitted, SitecoreAI appends the component to the very bottom of the placeholder.</p>
<p>You can retrieve the Component Instance ID in two ways:</p>
<ol>
<li><strong>Via Sitecore Marketer MCP:</strong> Ask your AI assistant with an explicit prompt:
<blockquote>
<p><em>get list of components from page <code>/sitecore/content/amitkumar/Contoso/Home</code> and include the component instance IDs.</em></p>
</blockquote>
</li>
</ol>


















  










  
  
    
    <img
      title="SitecoreAI Page Builder - Relative Positioning Context"
      loading="lazy"
      decoding="async"
      src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-add_component_on_page-2.PNG"
      alt="SitecoreAI Page Builder Component Positioning"
      class="img justify-self-center img-center img-md  "
      width=""
      height="" />
  
  








<ol start="2">
<li><strong>Via SitecoreAI Agent API:</strong> Execute the deterministic <code>GET</code> request below.</li>
</ol>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Postman Property</th><th>Value</th></tr>
      </thead><tbody><tr><td><strong>HTTP Method</strong></td><td><code>GET</code></td></tr><tr><td><strong>Request URL</strong></td><td><code>https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/pages/{{pageId}}/components</code></td></tr><tr><td><strong>Query Params</strong></td><td><code>language=en</code>, <code>version=1</code>, <code>variantId=00000000000000000000000000000001_00000000000000000000000000000002</code>, <code>includeRenderingDetails=true</code></td></tr><tr><td><strong>Headers</strong></td><td><code>Authorization: Bearer {{JWT_TOKEN}}</code><br/><code>x-sc-job-id: job-1234</code><br/><code>Accept: application/json</code></td></tr></tbody>
  
</table>
</div>
<p><strong>cURL Equivalent:</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -i -X GET <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  <span style="color:#f1fa8c">&#39;https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/pages/0000000000000000000000000000000/components?language=en&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  -H <span style="color:#f1fa8c">&#39;Authorization: Bearer &lt;YOUR_JWT_HERE&gt;&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  -H <span style="color:#f1fa8c">&#39;x-sc-job-id: job-1234&#39;</span>
</span></span></code></pre></div><p><strong>Sample API Response (HTTP 200 OK):</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;pageId&#34;</span>: <span style="color:#f1fa8c">&#34;0000000000000000000000000000000&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;pageName&#34;</span>: <span style="color:#f1fa8c">&#34;Home Page&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;pagePath&#34;</span>: <span style="color:#f1fa8c">&#34;/sitecore/content/Home&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;version&#34;</span>: <span style="color:#bd93f9">1</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;language&#34;</span>: <span style="color:#f1fa8c">&#34;en&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;route&#34;</span>: <span style="color:#f1fa8c">&#34;/home&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;layoutEditingKind&#34;</span>: <span style="color:#f1fa8c">&#34;Standard&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;template&#34;</span>: {
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;id&#34;</span>: <span style="color:#f1fa8c">&#34;0000000000000000000000000000000&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;name&#34;</span>: <span style="color:#f1fa8c">&#34;Article Page&#34;</span>
</span></span><span style="display:flex;"><span>  },
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;components&#34;</span>: [
</span></span><span style="display:flex;"><span>    {
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;id&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000101&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;componentId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000201&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;componentName&#34;</span>: <span style="color:#f1fa8c">&#34;RichText&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;dataSource&#34;</span>: <span style="color:#f1fa8c">&#34;local:/Data/Text 1&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;dataSourceItem&#34;</span>: {
</span></span><span style="display:flex;"><span>        <span style="color:#ff79c6">&#34;itemId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000301&#34;</span>,
</span></span><span style="display:flex;"><span>        <span style="color:#ff79c6">&#34;name&#34;</span>: <span style="color:#f1fa8c">&#34;Text 1&#34;</span>,
</span></span><span style="display:flex;"><span>        <span style="color:#ff79c6">&#34;path&#34;</span>: <span style="color:#f1fa8c">&#34;/sitecore/content/Tenant/Site/Home/Data/Text 1&#34;</span>,
</span></span><span style="display:flex;"><span>        <span style="color:#ff79c6">&#34;template&#34;</span>: <span style="color:#f1fa8c">&#34;Text&#34;</span>,
</span></span><span style="display:flex;"><span>        <span style="color:#ff79c6">&#34;fields&#34;</span>: {
</span></span><span style="display:flex;"><span>          <span style="color:#ff79c6">&#34;Text&#34;</span>: <span style="color:#f1fa8c">&#34;&lt;p&gt;Enterprise-Grade Agility with SitecoreAI.&lt;/p&gt;&#34;</span>
</span></span><span style="display:flex;"><span>        }
</span></span><span style="display:flex;"><span>      },
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;placeholder&#34;</span>: <span style="color:#f1fa8c">&#34;headless-main&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;parameters&#34;</span>: {
</span></span><span style="display:flex;"><span>        <span style="color:#ff79c6">&#34;GridParameters&#34;</span>: <span style="color:#f1fa8c">&#34;{7465D855-992E-4DC2-9855-A03250DFA74B}&#34;</span>,
</span></span><span style="display:flex;"><span>        <span style="color:#ff79c6">&#34;FieldNames&#34;</span>: <span style="color:#f1fa8c">&#34;{F7E889BA-D657-4DB8-B1AD-F766AECC7074}&#34;</span>,
</span></span><span style="display:flex;"><span>        <span style="color:#ff79c6">&#34;Styles&#34;</span>: <span style="color:#f1fa8c">&#34;{BD396F09-FD42-4D60-B489-EFD70926B07A}&#34;</span>
</span></span><span style="display:flex;"><span>      },
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;deviceId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000401&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;layoutId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000501&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;editable&#34;</span>: <span style="color:#ff79c6">true</span>
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>  ]
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><div class="callout tip">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="M15.362 5.214A8.252 8.252.0 0112 21 8.25 8.25.0 016.038 7.047 8.287 8.287.0 009 9.601a8.983 8.983.0 013.361-6.867 8.21 8.21.0 003 2.48z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 18a3.75 3.75.0 00.495-7.468 5.99 5.99.0 00-1.925 3.547 5.975 5.975.0 01-2.133-1.001A3.75 3.75.0 0012 18z"></path></svg><p>Identifying the Anchor Component</p>
    </div>
    <div class="callout-body">
        <p><span class="dark:text-gray-300 font-semibold gradient-text-aqua">Key Finding:</span> To insert your new component relative to an existing element, locate the target entry under <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">components[]</span> and copy its root <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">id</span> attribute (e.g., 00000000-0000-0000-0000-000000000101). Pass this value into insertBeforeComponentId or insertAfterComponentId when calling add_component_on_page - they are mutually exclusive, so you must choose only one anchor parameter, otherwise you will get error <strong>Value error, Provide only one of the insertBeforeComponentId or insertAfterComponentId</strong></p>
    </div>
</div>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="try-it-in-postman" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Try It in Postman</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>To add the component programmatically, dispatch a <code>POST</code> request to the SitecoreAI Agent API.</p>
<h5 id="-postman-configuration">📮 Postman Configuration</h5>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Configuration Property</th><th>Value / Setting</th><th>Description</th></tr>
      </thead><tbody><tr><td><strong>HTTP Method</strong></td><td><code>POST</code></td><td>Injects the component and creates its backing datasource item.</td></tr><tr><td><strong>Request URL</strong></td><td><code>https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/pages/{{pageId}}/components</code></td><td>Layout mutation endpoint.</td></tr><tr><td><strong>Path Variable (<code>pageId</code>)</strong></td><td><code>0000000000000000000000000000000</code></td><td>Unique identifier (GUID) of the target page.</td></tr><tr><td><strong>Headers</strong></td><td><code>Authorization: Bearer {{JWT_TOKEN}}</code><br/><code>Content-Type: application/json</code><br/><code>x-sc-job-id: job-add-sidebar-promo-001</code></td><td>Bearer auth, JSON body header, and audit Job ID.</td></tr><tr><td><strong>Body Format</strong></td><td><code>raw</code> ➡ <code>JSON</code></td><td>All payload attributes belong in the body (do not put these in the Params tab).</td></tr></tbody>
  
</table>
</div>
<p><strong>Request body (raw, JSON):</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;componentRenderingId&#34;</span>: <span style="color:#f1fa8c">&#34;86a03271-dff4-470a-92bd-b68c67de2e25&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;placeholderPath&#34;</span>: <span style="color:#f1fa8c">&#34;headless-main&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;componentItemName&#34;</span>: <span style="color:#f1fa8c">&#34;homePageRichText-1&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;language&#34;</span>: <span style="color:#f1fa8c">&#34;en&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;fields&#34;</span>: {
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;Text&#34;</span>: <span style="color:#f1fa8c">&#34;&lt;p&gt;1-Your rich text content goes here.&lt;/p&gt;&#34;</span>
</span></span><span style="display:flex;"><span>  },
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;insertAfterComponentId&#34;</span>: <span style="color:#f1fa8c">&#34;9c6d53e3-fe57-4638-af7b-6d68304c7a94&#34;</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p><strong>Sample API Response (HTTP 201 Created):</strong></p>
<p>A successful call returns <code>201</code> with <code>componentId</code>, <code>pageId</code>, <code>placeholderId</code> and, where relevant, <code>datasourceId</code> (The datasource item would be created as local item). Keep that <code>componentId</code>, because the move and remove calls need it. If you followed my previous <a href="https://www.amitk.net/blog/sitecore-marketer-mcp-vscode-integration/" target="_blank" rel="noopener">VS Code integration article</a>
, the structure is identical except for the new spatial before/after anchor.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;componentId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000101&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;pageId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000002&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;placeholderId&#34;</span>: <span style="color:#f1fa8c">&#34;headless-main&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;datasourceId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000301&#34;</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>

















  










  
  
    
    <img
      title="SitecoreAI Page Builder - Relative Positioning Context"
      loading="lazy"
      decoding="async"
      src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-add_component_on_page-3.PNG"
      alt="SitecoreAI Page Builder Component Positioning"
      class="img justify-self-center img-center img-md  "
      width=""
      height="" />
  
  
















<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="try-it-with-marketer-mcp" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Try It with Marketer MCP</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>When an autonomous AI agent in Copilot Studio, Cursor, or VS Code executes this step, it invokes the corresponding add_component_on_page tool over JSON-RPC:</p>
<p><strong>Marketer MCP Tool Prompt:</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>#add_component_on_page Add RichText component on Home page of site Contso with datasource item named homePageRichText-1 with Text field value as &#34;&lt;p&gt;1-Your rich text content goes here.&lt;/p&gt;&#34; and placeholder is headless-main with en language, and insert after Promo component which using the datasource as PromoLeft
</span></span></code></pre></div><p><strong>Marketer MCP Tool Response:</strong>


















  










  
  
    
    <img
      title="SitecoreAI Page Builder - Relative Positioning Context"
      loading="lazy"
      decoding="async"
      src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-add_component_on_page-4.PNG"
      alt="SitecoreAI Page Builder Component Positioning"
      class="img justify-self-center img-center img-lg  "
      width=""
      height="" />
  
  







</p>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h3 id="move-a-component-movecomponentonpage" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Move a Component (move_component_on_page)</h3>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>The <span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">move_component_on_page</span> operation repositions an existing component instance on the <strong>base page layout</strong> between compatible, editable placeholders.</p>
<div class="callout tip">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="M15.362 5.214A8.252 8.252.0 0112 21 8.25 8.25.0 016.038 7.047 8.287 8.287.0 009 9.601a8.983 8.983.0 013.361-6.867 8.21 8.21.0 003 2.48z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 18a3.75 3.75.0 00.495-7.468 5.99 5.99.0 00-1.925 3.547 5.975 5.975.0 01-2.133-1.001A3.75 3.75.0 0012 18z"></path></svg><p>How to Get the Component Instance IDs</p>
    </div>
    <div class="callout-body">
        <p><p><span class="dark:text-gray-300 font-semibold gradient-text-aqua">Anchor &amp; Target Identification:</span>
To move a component, you need both the <strong>target component instance ID</strong> (the item being moved) and the <strong>anchor component instance ID</strong> (<code>insertAfterComponentId</code> or <code>insertBeforeComponentId</code>).
<br/><br/>
You can retrieve these instance IDs by following the <strong>Add a Component Before or After Another</strong> section above using the SitecoreAI Agent API endpoint (<span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">Retrieve components on a page</span>) or by asking the Sitecore Marketer MCP tool:</p>
<blockquote>
<p><strong>get the list of components from page <code>/sitecore/content/amitkumar/Contoso/Home</code> and include the component instance IDs.</strong></p>
</blockquote>
</p>
    </div>
</div>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="try-it-in-postman" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Try It in Postman</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>To move the component programmatically, dispatch a <code>PATCH</code> request to update its layout position:</p>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Postman Property</th><th>Value</th></tr>
      </thead><tbody><tr><td><strong>HTTP Method</strong></td><td><code>PATCH</code></td></tr><tr><td><strong>Request URL</strong></td><td><code>{{baseUrl}}/api/v1/pages/{{pageId}}/components/{{componentId}}/position</code></td></tr><tr><td><strong>Headers</strong></td><td><code>Authorization: Bearer {{jwt}}</code><br/><code>x-sc-job-id: {{jobId}}</code><br/><code>Content-Type: application/json</code></td></tr></tbody>
  
</table>
</div>
<h5 id="request-body-raw--json">Request Body (<code>raw</code> ➡ <code>JSON</code>):</h5>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;targetPlaceholderPath&#34;</span>: <span style="color:#f1fa8c">&#34;/headless-main/container-1&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;insertBeforeComponentId&#34;</span>: <span style="color:#f1fa8c">&#34;3a6f45e9-9459-42d1-981f-0f2c97404bbd&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;language&#34;</span>: <span style="color:#f1fa8c">&#34;en&#34;</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p>cURL Equivalent:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -i -X PATCH <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  <span style="color:#f1fa8c">&#39;https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/pages/00000000-0000-0000-0000-000000000/components/00000000-0000-0000-0000-000000000101/position&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  -H <span style="color:#f1fa8c">&#39;Authorization: Bearer &lt;YOUR_JWT_HERE&gt;&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  -H <span style="color:#f1fa8c">&#39;x-sc-job-id: job-1234&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  -H <span style="color:#f1fa8c">&#39;Content-Type: application/json&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  -d <span style="color:#f1fa8c">&#39;{
</span></span></span><span style="display:flex;"><span><span style="color:#f1fa8c">    &#34;targetPlaceholderPath&#34;: &#34;/headless-main/container-1&#34;,
</span></span></span><span style="display:flex;"><span><span style="color:#f1fa8c">    &#34;insertBeforeComponentId&#34;: &#34;3a6f45e9-9459-42d1-981f-0f2c97404bbd&#34;,
</span></span></span><span style="display:flex;"><span><span style="color:#f1fa8c">    &#34;language&#34;: &#34;en&#34;
</span></span></span><span style="display:flex;"><span><span style="color:#f1fa8c">  }&#39;</span>
</span></span></code></pre></div><p><strong>API Response Status Codes</strong></p>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Status</th><th>Meaning</th></tr>
      </thead><tbody><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">200</span></td><td>Moved.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">400</span></td><td>Invalid move, or the target placeholder constraints were not met.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">404</span></td><td>The page, component instance or anchor was not found.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">403</span></td><td>Your role cannot update this page.</td></tr></tbody>
  
</table>
</div>
<p><strong>Sample Response Payload (HTTP 200 OK):</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;success&#34;</span>: <span style="color:#ff79c6">true</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;pageId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;componentInstanceId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000101&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;sourcePlaceholderPath&#34;</span>: <span style="color:#f1fa8c">&#34;/headless-main&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;targetPlaceholderPath&#34;</span>: <span style="color:#f1fa8c">&#34;/headless-main/container-1&#34;</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>

















  










  
  
    
    <img
      title="SitecoreAI Marketer MCP - Move Component on Page"
      loading="lazy"
      decoding="async"
      src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-move_component_on_page-1.PNG"
      alt="SitecoreAI Marketer MCP - Move Component on Page"
      class="img justify-self-center img-center img-full  "
      width=""
      height="" />
  
  
















<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="try-it-with-marketer-mcp" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Try It with Marketer MCP</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>When an AI assistant (such as Copilot Studio, Cursor, or VS Code) repositions components on your behalf, it executes the equivalent <code>move_component_on_page</code> tool over JSON-RPC:</p>
<p><strong>Marketer MCP Tool Prompt:</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>#move_component_on_page move the component RichText from placholder headless-main/container-1 placeholder to headless-main after the Image component present in headless-main placeholder
</span></span></code></pre></div><p><strong>Marketer MCP Tool Response:</strong></p>
<div class="callout warning">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73.0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898.0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"></path></svg><p>Real-World Gotcha: Cross-Placeholder Moves</p>
    </div>
    <div class="callout-body">
        <p><p><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">A Lesson from Hands-On Testing:</span>
<br/><br/>
While testing <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">move_component_on_page</span> in the Marketer MCP tool, I attempted to move a component out of a nested container (<span class="dark:text-gray-300 font-semibold gradient-text-aqua">headless-main/container-1</span>) up to the root placeholder (<span class="dark:text-gray-300 font-semibold gradient-text-aqua">headless-main</span>).</p>
<p>Even though all parameter values were correctly defined, the tool returned an error and blocked the move. To get the operation to succeed, I kept the move scoped <strong>within the exact same placeholder</strong> (<span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">headless-main/container-1</span>).</p>
<p>If you encounter unexpected errors when moving components, keep your reordering confined to the same placeholder scope.</p>
</p>
    </div>
</div>
<p><strong>Error Details:</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;success&#34;</span>: <span style="color:#ff79c6">false</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;error&#34;</span>: {
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;code&#34;</span>: <span style="color:#f1fa8c">&#34;INVALID_ARGUMENT&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;message&#34;</span>: <span style="color:#f1fa8c">&#34;Invalid request (400). Check pageId, componentInstanceId, move directives, and targetPlaceholderPath rules.&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;retryable&#34;</span>: <span style="color:#ff79c6">false</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;statusCode&#34;</span>: <span style="color:#bd93f9">400</span>
</span></span><span style="display:flex;"><span>  },
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;diagnostics&#34;</span>: {
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;resolvedApiBaseUrl&#34;</span>: <span style="color:#f1fa8c">&#34;https://edge-platform.sitecorecloud.io/ai/ai-agent-api&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;statusCode&#34;</span>: <span style="color:#bd93f9">400</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;statusCodes&#34;</span>: {
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;preCheck&#34;</span>: <span style="color:#bd93f9">200</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;move&#34;</span>: <span style="color:#bd93f9">400</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;postCheck&#34;</span>: <span style="color:#ff79c6">null</span>
</span></span><span style="display:flex;"><span>    },
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;retryCount&#34;</span>: <span style="color:#bd93f9">0</span>
</span></span><span style="display:flex;"><span>  }
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;success&#34;</span>: <span style="color:#ff79c6">false</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;error&#34;</span>: {
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;code&#34;</span>: <span style="color:#f1fa8c">&#34;INVALID_ARGUMENT&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;message&#34;</span>: <span style="color:#f1fa8c">&#34;Invalid request (400). Check pageId, componentInstanceId, move directives, and targetPlaceholderPath rules.&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;retryable&#34;</span>: <span style="color:#ff79c6">false</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;statusCode&#34;</span>: <span style="color:#bd93f9">400</span>
</span></span><span style="display:flex;"><span>  },
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;diagnostics&#34;</span>: {
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;resolvedApiBaseUrl&#34;</span>: <span style="color:#f1fa8c">&#34;https://edge-platform.sitecorecloud.io/ai/ai-agent-api&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;statusCode&#34;</span>: <span style="color:#bd93f9">400</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;statusCodes&#34;</span>: {
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;preCheck&#34;</span>: <span style="color:#bd93f9">200</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;move&#34;</span>: <span style="color:#bd93f9">400</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;postCheck&#34;</span>: <span style="color:#ff79c6">null</span>
</span></span><span style="display:flex;"><span>    },
</span></span><span style="display:flex;"><span>    <span style="color:#ff79c6">&#34;retryCount&#34;</span>: <span style="color:#bd93f9">0</span>
</span></span><span style="display:flex;"><span>  }
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>

















  










  
  
    
    <img
      title="SitecoreAI Page Builder - Relative Positioning Context"
      loading="lazy"
      decoding="async"
      src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-move_component_on_page-2.PNG"
      alt="SitecoreAI Page Builder Component Positioning"
      class="img justify-self-center img-center img-lg  "
      width=""
      height="" />
  
  








<div class="callout tip">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="M15.362 5.214A8.252 8.252.0 0112 21 8.25 8.25.0 016.038 7.047 8.287 8.287.0 009 9.601a8.983 8.983.0 013.361-6.867 8.21 8.21.0 003 2.48z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 18a3.75 3.75.0 00.495-7.468 5.99 5.99.0 00-1.925 3.547 5.975 5.975.0 01-2.133-1.001A3.75 3.75.0 0012 18z"></path></svg><p>Why Both Matter: MCP vs. Agent API</p>
    </div>
    <div class="callout-body">
        <p><span class="dark:text-gray-300 font-semibold gradient-text-aqua">Real-World Purpose:</span> Use the <strong>Agent API</strong> when scripting repeatable pipelines that need exact JSON status codes. Use the <strong>Marketer MCP tool</strong> when an AI assistant is guiding the changes, as it summarizes the risks and asks for confirmation before altering live layouts.</p>
    </div>
</div>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h3 id="delete-a-content-item-safely-deletecontent" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Delete a Content Item Safely (delete_content)</h3>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>The <span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">delete_content</span> operation permanently deletes a content or datasource item. Beyond simply deleting the record, it provides governance telemetry by reporting downstream layout impacts, affected components, and active A/B experiments.</p>
<div class="callout tip">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="M15.362 5.214A8.252 8.252.0 0112 21 8.25 8.25.0 016.038 7.047 8.287 8.287.0 009 9.601a8.983 8.983.0 013.361-6.867 8.21 8.21.0 003 2.48z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 18a3.75 3.75.0 00.495-7.468 5.99 5.99.0 00-1.925 3.547 5.975 5.975.0 01-2.133-1.001A3.75 3.75.0 0012 18z"></path></svg><p>Locating Content and Component IDs</p>
    </div>
    <div class="callout-body">
        <p><p><span class="dark:text-gray-300 font-semibold gradient-text-aqua">Reusing Identified Identifiers:</span>
To delete a datasource safely, supply the target item&rsquo;s GUID (<code>itemId</code>).
<br/><br/>
If the response indicates unremoved component references, you can retrieve the corresponding instance IDs by following the <strong>Add a Component Before or After Another</strong> section above (<span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">Retrieve components on a page</span>) or by asking the Marketer MCP tool:</p>
<blockquote>
<p><em>&ldquo;Get the list of components from page <code>/sitecore/content/amitkumar/Contoso/Home</code> and include the component instance IDs.&rdquo;</em>
<br/><br/>
You can then use those IDs directly in <code>remove_component_on_page</code> to clean up remaining layout bindings.</p>
</blockquote>
</p>
    </div>
</div>
<p>







<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="try-it-in-postman" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Try It in Postman</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div><br/>
To execute the deletion programmatically, dispatch a <code>DELETE</code> request to the SitecoreAI Agent API:</p>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Postman Property</th><th>Value</th></tr>
      </thead><tbody><tr><td><strong>HTTP Method</strong></td><td><code>DELETE</code></td></tr><tr><td><strong>Request URL</strong></td><td><code>https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/content/{{itemId}}</code></td></tr><tr><td><strong>Query Params</strong></td><td><code>remove_references=true</code> (optional)</td></tr><tr><td><strong>Headers</strong></td><td><code>Authorization: Bearer {{jwt}}</code><br/><code>x-sc-job-id: {{jobId}}</code><br/><code>Accept: application/json</code></td></tr></tbody>
  
</table>
</div>
<p>cURL Equivalent:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -i -X DELETE <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  <span style="color:#f1fa8c">&#39;https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/content/00000000-0000-0000-0000-000000000301?remove_references=false&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  -H <span style="color:#f1fa8c">&#39;Authorization: Bearer &lt;YOUR_JWT_HERE&gt;&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  -H <span style="color:#f1fa8c">&#39;x-sc-job-id: job-1234&#39;</span>
</span></span></code></pre></div><div class="callout info">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75.0 011.063.852l-.708 2.836a.75.75.0 001.063.853l.041-.021M21 12A9 9 0 113 12a9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"></path></svg><p>Deletion covers every language</p>
    </div>
    <div class="callout-body">
        <p><p><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Deleting a content item removes it across all language versions.</span></p>
<p>The language parameter does not limit deletion to a single language version, so plan your cleanup operations accordingly.</p>
</p>
    </div>
</div>
<p><strong>API Response Status Codes</strong></p>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Status</th><th>Meaning</th></tr>
      </thead><tbody><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">200 OK</span></td><td>Content deleted successfully and impact report returned.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">400 Bad Request</span></td><td>Invalid item ID format or reference cascade violation.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">404 Not Found</span></td><td>The specified content item was not found.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">403 Forbidden</span></td><td>Your role or credentials lack permission to delete this content item.</td></tr></tbody>
  
</table>
</div>
<p><strong>Sample Response Payload (HTTP 200 OK):</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;success&#34;</span>: <span style="color:#ff79c6">true</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;deletedId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000301&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;affectedComponents&#34;</span>: [
</span></span><span style="display:flex;"><span>    {
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;pageId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-0000000003017&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;pageName&#34;</span>: <span style="color:#f1fa8c">&#34;Home&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;componentId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-000000000101&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;componentRenderingId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-0000000001014&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;placeholderKey&#34;</span>: <span style="color:#f1fa8c">&#34;/headless-main/container-1&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;language&#34;</span>: <span style="color:#f1fa8c">&#34;en&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;removed&#34;</span>: <span style="color:#ff79c6">false</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#ff79c6">&#34;error&#34;</span>: <span style="color:#ff79c6">null</span>
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>  ],
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;affectedExperiments&#34;</span>: []
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><div class="callout info">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75.0 011.063.852l-.708 2.836a.75.75.0 001.063.853l.041-.021M21 12A9 9 0 113 12a9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"></path></svg><p>Response Payload Breakdown: delete_content</p>
    </div>
    <div class="callout-body">
        <p><p><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Understanding the Impact Report:</span>
<br/><br/></p>
<p style="color: #0f172a !important; margin-bottom: 0.75rem;">
  The response payload returns <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">deletedId</span>, <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">affectedComponents</span>, and <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">affectedExperiments</span>. Each record inside the <code>affectedComponents</code> array provides granular layout context: <code>pageId</code>, <code>pageName</code>, <code>componentId</code>, <code>placeholderKey</code>, <code>language</code>, and the <code>removed</code> boolean flag.
</p>
<ul style="list-style-type: disc; padding-left: 1.5rem; margin-top: 0.5rem; color: #0f172a !important;">
  <li style="margin-bottom: 0.5rem; color: #0f172a !important;">
    <span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Always Populated:</span> 
    <span style="color: #0f172a !important;">The <code>affectedComponents</code> array is returned on every call, regardless of whether <code>remove_references</code> was set to <code>true</code> or <code>false</code>.</span>
  </li>
  <li style="margin-bottom: 0.5rem; color: #0f172a !important;">
    <span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">Active Cascade Flag:</span> 
    <span style="color: #0f172a !important;">The <code>removed</code> attribute evaluates to <code>true</code> <em>only</em> when the engine's cascading routine actively detached the rendering from the layout.</span>
  </li>
  <li style="margin-bottom: 0.5rem; color: #0f172a !important;">
    <span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">Actionable Cleanups:</span> 
    <span style="color: #0f172a !important;">The returned <code>componentId</code> matches the exact instance ID required by <code>remove_component_on_page</code>, allowing you to clean up any leftover bindings deterministically.</span>
  </li>
</ul></p>
    </div>
</div>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="try-it-with-marketer-mcp" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Try It with Marketer MCP</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>When an AI assistant (such as Copilot Studio, Cursor, or VS Code) deletes content on your behalf, it executes the corresponding delete_content tool over JSON-RPC:</p>
<p><strong>Marketer MCP Tool Prompt:</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>#delete_content  delete the homePageRichText-1 datasource item
</span></span></code></pre></div><p><strong>Marketer MCP Tool Response:</strong></p>
<div id="slider-1792541226297961866" class="relative w-full max-w-xl mx-auto my-8 group" style="position: relative; width: 100%; max-width: 36rem; margin: 2rem auto; overflow: hidden;">

    
    <div class="slider-track flex overflow-x-auto snap-x snap-mandatory scroll-smooth rounded-xl" style="display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; width: 100%;">
        
  <div class="snap-center" style="flex: 0 0 100%; min-width: 100%; width: 100%; scroll-snap-align: center; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; background-color: rgba(243, 244, 246, 0.5); border-radius: 0.75rem;">
  
      
      <div style="position: relative; max-width: 100%; width: 100%; display: flex; justify-content: center; align-items: center;">
          <div class="slider-zoomable-trigger"
               data-src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-delete_content-1.PNG"
               data-title="Sitecore Marketer MCP Delete Content"
               style="display: block; width: 100%; text-align: center; cursor: zoom-in;">
              <img src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-delete_content-1.PNG"
                   alt="Sitecore Marketer MCP Delete Content"
                   
                   
                   style="max-width: 100%; height: auto; object-fit: contain; border-radius: 0.375rem; margin: 0 auto; display: block;"
                   loading="eager"
                   decoding="async" />
          </div>
      </div>
      
  
      
  
  </div>
  <div class="snap-center" style="flex: 0 0 100%; min-width: 100%; width: 100%; scroll-snap-align: center; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; background-color: rgba(243, 244, 246, 0.5); border-radius: 0.75rem;">
  
      
      <div style="position: relative; max-width: 100%; width: 100%; display: flex; justify-content: center; align-items: center;">
          <div class="slider-zoomable-trigger"
               data-src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-delete_content-2.PNG"
               data-title="Sitecore Marketer MCP Delete Content"
               style="display: block; width: 100%; text-align: center; cursor: zoom-in;">
              <img src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-delete_content-2.PNG"
                   alt="Sitecore Marketer MCP Delete Content"
                   
                   
                   style="max-width: 100%; height: auto; object-fit: contain; border-radius: 0.375rem; margin: 0 auto; display: block;"
                   loading="eager"
                   decoding="async" />
          </div>
      </div>
      
  
      
  
  </div>
  <div class="snap-center" style="flex: 0 0 100%; min-width: 100%; width: 100%; scroll-snap-align: center; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; background-color: rgba(243, 244, 246, 0.5); border-radius: 0.75rem;">
  
      
      <div style="position: relative; max-width: 100%; width: 100%; display: flex; justify-content: center; align-items: center;">
          <div class="slider-zoomable-trigger"
               data-src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-delete_content-3.PNG"
               data-title="Sitecore Marketer MCP Delete Content"
               style="display: block; width: 100%; text-align: center; cursor: zoom-in;">
              <img src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-delete_content-3.PNG"
                   alt="Sitecore Marketer MCP Delete Content"
                   
                   
                   style="max-width: 100%; height: auto; object-fit: contain; border-radius: 0.375rem; margin: 0 auto; display: block;"
                   loading="eager"
                   decoding="async" />
          </div>
      </div>
      
  
      
  
  </div>
  <div class="snap-center" style="flex: 0 0 100%; min-width: 100%; width: 100%; scroll-snap-align: center; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; background-color: rgba(243, 244, 246, 0.5); border-radius: 0.75rem;">
  
      
      <div style="position: relative; max-width: 100%; width: 100%; display: flex; justify-content: center; align-items: center;">
          <div class="slider-zoomable-trigger"
               data-src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-delete_content-4.PNG"
               data-title="Sitecore Marketer MCP Delete Content"
               style="display: block; width: 100%; text-align: center; cursor: zoom-in;">
              <img src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-delete_content-4.PNG"
                   alt="Sitecore Marketer MCP Delete Content"
                   
                   
                   style="max-width: 100%; height: auto; object-fit: contain; border-radius: 0.375rem; margin: 0 auto; display: block;"
                   loading="eager"
                   decoding="async" />
          </div>
      </div>
      
  
      
  
  </div>

    </div>

    
    <button type="button"
            class="prev-btn"
            aria-label="Previous Slide"
            style="position: absolute; left: 0.5rem; top: 50%; transform: translateY(-50%); background-color: rgba(17, 24, 39, 0.8); color: white; border: none; padding: 0.5rem; border-radius: 9999px; cursor: pointer; z-index: 5; display: flex; align-items: center; justify-content: center;">
        <svg style="width: 1.25rem; height: 1.25rem;" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M15 19l-7-7 7-7" /></svg>
    </button>

    
    <button type="button"
            class="next-btn"
            aria-label="Next Slide"
            style="position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); background-color: rgba(17, 24, 39, 0.8); color: white; border: none; padding: 0.5rem; border-radius: 9999px; cursor: pointer; z-index: 5; display: flex; align-items: center; justify-content: center;">
        <svg style="width: 1.25rem; height: 1.25rem;" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M9 5l7 7-7 7" /></svg>
    </button>

    
    <dialog class="slider-modal" style="padding: 0; border: none; border-radius: 0.5rem; background: transparent; max-width: 90vw; max-height: 90vh; overflow: visible;">
        <div style="position: relative; background: rgba(0,0,0,0.9); padding: 1rem; border-radius: 0.5rem; display: flex; flex-direction: column; align-items: center;">
            <button type="button" class="close-modal-btn" style="position: absolute; top: -0.75rem; right: -0.75rem; background: #ef4444; color: white; border: none; border-radius: 9999px; width: 2rem; height: 2rem; font-weight: bold; cursor: pointer; z-index: 50; display: flex; align-items: center; justify-content: center;">✕</button>
            <img class="modal-img" src="" alt="" style="max-width: 85vw; max-height: 80vh; object-fit: contain; border-radius: 0.25rem; display: block;" />
            <p class="modal-caption" style="color: white; font-size: 0.875rem; margin-top: 0.5rem; text-align: center;"></p>
        </div>
    </dialog>
</div>

<script>
  (function() {
    function initSlider() {
      const container = document.getElementById('slider-1792541226297961866');
      if (!container) return;

      const track = container.querySelector('.slider-track');
      const prevBtn = container.querySelector('.prev-btn');
      const nextBtn = container.querySelector('.next-btn');
      const modal = container.querySelector('.slider-modal');
      const modalImg = container.querySelector('.modal-img');
      const modalCaption = container.querySelector('.modal-caption');
      const closeBtn = container.querySelector('.close-modal-btn');

      
      if (track && prevBtn && nextBtn) {
        prevBtn.addEventListener('click', function(e) {
          e.preventDefault();
          e.stopPropagation();
          track.scrollBy({ left: -track.clientWidth, behavior: 'smooth' });
        });
        nextBtn.addEventListener('click', function(e) {
          e.preventDefault();
          e.stopPropagation();
          track.scrollBy({ left: track.clientWidth, behavior: 'smooth' });
        });
      }

      
      const triggers = container.querySelectorAll('.slider-zoomable-trigger');
      triggers.forEach(function(trigger) {
        trigger.addEventListener('click', function(e) {
          e.preventDefault();
          e.stopPropagation();

          const src = trigger.getAttribute('data-src');
          const title = trigger.getAttribute('data-title') || '';

          if (modal && modalImg && src) {
            modalImg.src = src;
            if (modalCaption) modalCaption.textContent = title;
            modal.showModal();
          }
        });
      });

      
      if (modal) {
        if (closeBtn) {
          closeBtn.addEventListener('click', function() {
            modal.close();
          });
        }
        modal.addEventListener('click', function(e) {
          if (e.target === modal) {
            modal.close();
          }
        });
      }
    }

    if (document.readyState === 'loading') {
      document.addEventListener('DOMContentLoaded', initSlider);
    } else {
      initSlider();
    }
  })();
</script>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h3 id="remove-a-component-and-check-the-ab-test-report-removecomponentonpage" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Remove a Component and Check the A/B Test Report (remove_component_on_page)</h3>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>The <span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">remove_component_on_page</span> operation removes a component instance from a page layout.</p>
<p>Unlike a destructive delete that fails if dependencies are active, this endpoint incorporates a <strong>governance safeguard</strong>: instead of failing the request, it completes the removal and returns an <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">affectedExperiments</span> report so you can review any impacted A/B/n tests.</p>
<div class="callout tip">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="M15.362 5.214A8.252 8.252.0 0112 21 8.25 8.25.0 016.038 7.047 8.287 8.287.0 009 9.601a8.983 8.983.0 013.361-6.867 8.21 8.21.0 003 2.48z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 18a3.75 3.75.0 00.495-7.468 5.99 5.99.0 00-1.925 3.547 5.975 5.975.0 01-2.133-1.001A3.75 3.75.0 0012 18z"></path></svg><p>Locating the Component Instance ID</p>
    </div>
    <div class="callout-body">
        <p><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Retrieving the Target ID:</span>
<br/><br/>
<span style="color: #0f172a !important;">
To remove a component, you need its root <code>componentId</code> (the instance ID). Retrieve it by following the <strong>Add a Component Before or After Another</strong> section above using the Agent API (<code>Retrieve components on a page</code>) or by prompting the Marketer MCP tool:
</span>
<br/>
<em style="color: #1e293b !important;">&ldquo;Get the list of components from page /sitecore/content/Tenant/Site/Home and include component instance IDs.&quot;</em></p>
    </div>
</div>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="try-it-in-postman" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Try It in Postman</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>To remove the component programmatically, dispatch a <code>DELETE</code> request to the layout components endpoint:</p>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Postman Property</th><th>Value</th></tr>
      </thead><tbody><tr><td><strong>HTTP Method</strong></td><td><code>DELETE</code></td></tr><tr><td><strong>Request URL</strong></td><td><code>{{baseUrl}}/api/v1/pages/{{pageId}}/components/{{componentId}}</code></td></tr><tr><td><strong>Headers</strong></td><td><code>Authorization: Bearer {{jwt}}</code><br/><code>x-sc-job-id: {{jobId}}</code><br/><code>Accept: application/json</code></td></tr></tbody>
  
</table>
</div>
<h6 id="curl-equivalent">cURL Equivalent:</h6>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -i -X DELETE <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  <span style="color:#f1fa8c">&#39;https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/pages/00000000-0000-0000-0000-000000000002/components/00000000-0000-0000-0000-000000000101?language=en&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  -H <span style="color:#f1fa8c">&#39;Authorization: Bearer &lt;YOUR_JWT_HERE&gt;&#39;</span> <span style="color:#f1fa8c">\
</span></span></span><span style="display:flex;"><span>  -H <span style="color:#f1fa8c">&#39;x-sc-job-id: job-1234&#39;</span>
</span></span></code></pre></div><p><strong>API Response Status Codes</strong></p>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Status</th><th>Meaning</th></tr>
      </thead><tbody><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">200 OK</span></td><td>Content deleted successfully and impact report returned.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">400 Bad Request</span></td><td>Invalid item ID format or reference cascade violation.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">404 Not Found</span></td><td>The specified content item was not found.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">403 Forbidden</span></td><td>Your role or credentials lack permission to delete this content item.</td></tr></tbody>
  
</table>
</div>
<p><strong>Sample Response Payload (HTTP 200 OK):</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;success&#34;</span>: <span style="color:#ff79c6">true</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;removedComponentId&#34;</span>: <span style="color:#f1fa8c">&#34;00000000-0000-0000-0000-00000000030171&#34;</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#ff79c6">&#34;affectedExperiments&#34;</span>: []
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><div class="callout warning">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73.0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898.0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"></path></svg><p>The Silent A/B Gotcha: Always Read the Response</p>
    </div>
    <div class="callout-body">
        <p><p><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Removing a component does not fail if an experiment is active!</span></p>
<p>Where traditional APIs might throw a 409 Conflict or block deletion, the Agent API removes the rendering and returns an HTTP 200 OK with the details in affectedExperiments.</p>
<p>If your CI/CD pipelines or automated scripts delete layout elements, you must actively parse the response payload to ensure you are not invalidating live optimization tests.</p>
</p>
    </div>
</div>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="try-it-with-marketer-mcp" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Try It with Marketer MCP</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>When an AI assistant (such as <span class="dark:text-gray-300 font-semibold gradient-text-aqua">GitHub Copilot</span>, <span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Cursor</span>, or <span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">Claude Desktop</span>) removes components, it invokes the <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">remove_component_on_page</span> tool over standard JSON-RPC.</p>
<p>Unlike direct REST API calls, the <strong>Marketer MCP tool</strong> evaluates the blast radius first—detecting any active A/B experiments and prompting the user for <span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">explicit confirmation</span> before altering the layout.</p>
<p><strong>Marketer MCP Tool Prompt:</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>#remove_component_on_page  remove RichText component from Home page which uses the datasource as homePageRichText-1
</span></span></code></pre></div><p><strong>Marketer MCP Tool Response:</strong></p>
<div id="slider-1792541226300093909" class="relative w-full max-w-xl mx-auto my-8 group" style="position: relative; width: 100%; max-width: 36rem; margin: 2rem auto; overflow: hidden;">

    
    <div class="slider-track flex overflow-x-auto snap-x snap-mandatory scroll-smooth rounded-xl" style="display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; width: 100%;">
        
  <div class="snap-center" style="flex: 0 0 100%; min-width: 100%; width: 100%; scroll-snap-align: center; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; background-color: rgba(243, 244, 246, 0.5); border-radius: 0.75rem;">
  
      
      <div style="position: relative; max-width: 100%; width: 100%; display: flex; justify-content: center; align-items: center;">
          <div class="slider-zoomable-trigger"
               data-src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-remove_component-1.PNG"
               data-title="Sitecore Marketer MCP Remove Component"
               style="display: block; width: 100%; text-align: center; cursor: zoom-in;">
              <img src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-remove_component-1.PNG"
                   alt="Sitecore Marketer MCP Remove Component"
                   
                   
                   style="max-width: 100%; height: auto; object-fit: contain; border-radius: 0.375rem; margin: 0 auto; display: block;"
                   loading="eager"
                   decoding="async" />
          </div>
      </div>
      
  
      
  
  </div>
  <div class="snap-center" style="flex: 0 0 100%; min-width: 100%; width: 100%; scroll-snap-align: center; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; background-color: rgba(243, 244, 246, 0.5); border-radius: 0.75rem;">
  
      
      <div style="position: relative; max-width: 100%; width: 100%; display: flex; justify-content: center; align-items: center;">
          <div class="slider-zoomable-trigger"
               data-src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-remove_component-2.PNG"
               data-title="Sitecore Marketer MCP Remove Component"
               style="display: block; width: 100%; text-align: center; cursor: zoom-in;">
              <img src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-remove_component-2.PNG"
                   alt="Sitecore Marketer MCP Remove Component"
                   
                   
                   style="max-width: 100%; height: auto; object-fit: contain; border-radius: 0.375rem; margin: 0 auto; display: block;"
                   loading="eager"
                   decoding="async" />
          </div>
      </div>
      
  
      
  
  </div>
  <div class="snap-center" style="flex: 0 0 100%; min-width: 100%; width: 100%; scroll-snap-align: center; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; background-color: rgba(243, 244, 246, 0.5); border-radius: 0.75rem;">
  
      
      <div style="position: relative; max-width: 100%; width: 100%; display: flex; justify-content: center; align-items: center;">
          <div class="slider-zoomable-trigger"
               data-src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-remove_component-3.PNG"
               data-title="Sitecore Marketer MCP Remove Component"
               style="display: block; width: 100%; text-align: center; cursor: zoom-in;">
              <img src="https://www.amitk.net/images/sitecoreai-marketer-mcp-agent-api-layout/sitecoreai-marketer-mcp-remove_component-3.PNG"
                   alt="Sitecore Marketer MCP Remove Component"
                   
                   
                   style="max-width: 100%; height: auto; object-fit: contain; border-radius: 0.375rem; margin: 0 auto; display: block;"
                   loading="eager"
                   decoding="async" />
          </div>
      </div>
      
  
      
  
  </div>

    </div>

    
    <button type="button"
            class="prev-btn"
            aria-label="Previous Slide"
            style="position: absolute; left: 0.5rem; top: 50%; transform: translateY(-50%); background-color: rgba(17, 24, 39, 0.8); color: white; border: none; padding: 0.5rem; border-radius: 9999px; cursor: pointer; z-index: 5; display: flex; align-items: center; justify-content: center;">
        <svg style="width: 1.25rem; height: 1.25rem;" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M15 19l-7-7 7-7" /></svg>
    </button>

    
    <button type="button"
            class="next-btn"
            aria-label="Next Slide"
            style="position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); background-color: rgba(17, 24, 39, 0.8); color: white; border: none; padding: 0.5rem; border-radius: 9999px; cursor: pointer; z-index: 5; display: flex; align-items: center; justify-content: center;">
        <svg style="width: 1.25rem; height: 1.25rem;" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M9 5l7 7-7 7" /></svg>
    </button>

    
    <dialog class="slider-modal" style="padding: 0; border: none; border-radius: 0.5rem; background: transparent; max-width: 90vw; max-height: 90vh; overflow: visible;">
        <div style="position: relative; background: rgba(0,0,0,0.9); padding: 1rem; border-radius: 0.5rem; display: flex; flex-direction: column; align-items: center;">
            <button type="button" class="close-modal-btn" style="position: absolute; top: -0.75rem; right: -0.75rem; background: #ef4444; color: white; border: none; border-radius: 9999px; width: 2rem; height: 2rem; font-weight: bold; cursor: pointer; z-index: 50; display: flex; align-items: center; justify-content: center;">✕</button>
            <img class="modal-img" src="" alt="" style="max-width: 85vw; max-height: 80vh; object-fit: contain; border-radius: 0.25rem; display: block;" />
            <p class="modal-caption" style="color: white; font-size: 0.875rem; margin-top: 0.5rem; text-align: center;"></p>
        </div>
    </dialog>
</div>

<script>
  (function() {
    function initSlider() {
      const container = document.getElementById('slider-1792541226300093909');
      if (!container) return;

      const track = container.querySelector('.slider-track');
      const prevBtn = container.querySelector('.prev-btn');
      const nextBtn = container.querySelector('.next-btn');
      const modal = container.querySelector('.slider-modal');
      const modalImg = container.querySelector('.modal-img');
      const modalCaption = container.querySelector('.modal-caption');
      const closeBtn = container.querySelector('.close-modal-btn');

      
      if (track && prevBtn && nextBtn) {
        prevBtn.addEventListener('click', function(e) {
          e.preventDefault();
          e.stopPropagation();
          track.scrollBy({ left: -track.clientWidth, behavior: 'smooth' });
        });
        nextBtn.addEventListener('click', function(e) {
          e.preventDefault();
          e.stopPropagation();
          track.scrollBy({ left: track.clientWidth, behavior: 'smooth' });
        });
      }

      
      const triggers = container.querySelectorAll('.slider-zoomable-trigger');
      triggers.forEach(function(trigger) {
        trigger.addEventListener('click', function(e) {
          e.preventDefault();
          e.stopPropagation();

          const src = trigger.getAttribute('data-src');
          const title = trigger.getAttribute('data-title') || '';

          if (modal && modalImg && src) {
            modalImg.src = src;
            if (modalCaption) modalCaption.textContent = title;
            modal.showModal();
          }
        });
      });

      
      if (modal) {
        if (closeBtn) {
          closeBtn.addEventListener('click', function() {
            modal.close();
          });
        }
        modal.addEventListener('click', function(e) {
          if (e.target === modal) {
            modal.close();
          }
        });
      }
    }

    if (document.readyState === 'loading') {
      document.addEventListener('DOMContentLoaded', initSlider);
    } else {
      initSlider();
    }
  })();
</script>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h4 id="-key-technical-takeaways" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">💡 Key Technical Takeaways</h4>
 
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<ul>
<li>
<p>🧩 <span class="dark:text-gray-300 font-semibold gradient-text-aqua">Mutations vs. Cascade:</span><br>
Removing a component only deletes the <strong>presentation rendering reference</strong> from the page layout delta (<code>final layout</code>). It does <strong>not</strong> delete the underlying datasource item-use <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">delete_content</span> (covered above) if you want to eliminate the content item as well.</p>
</li>
<li>
<p>🛡️ <span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Safe A/B Testing Governance:</span><br>
Both the Agent API and Marketer MCP surface <span class="rounded-lg inlinehighlight shadow transition dark:bg-gray-100 dark:text-gray-600 bg-primary text-white">affectedExperiments</span> directly in the response payload instead of aborting the operation with a <code>4xx</code> error code.</p>
</li>
<li>
<p>🤖 <span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">MCP Interactive Safety:</span><br>
In conversational AI tooling (Cursor, VS Code, Copilot Studio), the MCP server intercepts the call to confirm the removal with the marketer before committing changes to the layout.</p>
</li>
</ul>
<hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h3 id="review-and-undo-a-job" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">Review and Undo a Job</h3>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Purpose</th><th>Request</th></tr>
      </thead><tbody><tr><td>List what the job did</td><td><code>GET {{baseUrl}}/api/v1/jobs/{{jobId}}/operations</code></td></tr><tr><td>Undo the job</td><td><code>POST {{baseUrl}}/api/v1/jobs/{{jobId}}/revert</code></td></tr></tbody>
  
</table>
</div>
<p>The operations call lists each action with its type, status and timestamps. The revert call restores the state before the job ran.</p>
<div class="callout info">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75.0 011.063.852l-.708 2.836a.75.75.0 001.063.853l.041-.021M21 12A9 9 0 113 12a9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"></path></svg><p>Your safety net</p>
    </div>
    <div class="callout-body">
        <p><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">Send the same x-sc-job-id on every related call and you get one revert for the whole change.</span>
<br/><br/>
This is what makes the rest of this guide reasonable to try on a real tenant.</p>
    </div>
</div>
<hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-best-practices" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">✅ Best Practices</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<ul>
<li>📖 <span class="dark:text-gray-300 font-semibold gradient-text-aqua">Read before you write:</span> call the referrers endpoint before any delete, and <code>get_components_on_page</code> before any move so you have real instance IDs.</li>
<li>🧾 <span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">One job ID per logical change:</span> several related calls under one ID means one revert.</li>
<li>📍 <span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">Prefer anchors to guesses:</span> pass <code>insertBeforeComponentId</code> or <code>insertAfterComponentId</code> rather than relying on whatever order the page has today.</li>
<li>📝 <span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Log the response, not just the status:</span> <code>affectedExperiments</code> and <code>affectedComponents</code> are the real result.</li>
<li>🧪 <span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">Rehearse in a non-production site first:</span> all Agent API requests run against your production environment.</li>
</ul>
<hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-common-pitfalls" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">⚠️ Common Pitfalls</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Pitfall</th><th>What Actually Happens</th></tr>
      </thead><tbody><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Assuming a 409 will stop you</span></td><td>The documented remove response is a <code>200</code> with experiment details, not a conflict. Don&rsquo;t build an agent that relies on being blocked.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">Mixing up IDs</span></td><td><code>componentId</code> in remove is the component instance ID, not the rendering ID or datasource ID.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-aqua">Reading null as zero</span></td><td>In the referrers response, <code>total_places: null</code> means unknown.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">Moving variant content</span></td><td>The move endpoint documents the base page layout, so don&rsquo;t assume it edits personalization or A/B variants.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">Forgetting all-language deletion</span></td><td>Delete removes every language version.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-vital-ocean">Placeholder path format</span></td><td>The docs show paths like <code>/main/content</code> with a leading slash, while some older payloads used <code>headless-main</code>. Copy the format from <code>get_components_on_page</code>.</td></tr></tbody>
  
</table>
</div>
<hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-performance-considerations" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">🚀 Performance Considerations</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>The Marketer MCP server rate limit is documented as <a href="https://doc.sitecore.com/sai/en/users/sitecoreai/sitecore-marketer-mcp-server/marketer-mcp-tool-reference-and-other-information.html?utm_source=kapa#security-and-compliance" target="_blank" rel="noopener">50 requests per 10 seconds</a>
, so a bulk job that touches hundreds of pages needs throttling. In Postman, use the Collection Runner with a delay between requests. For scripts, batch by page and back off when throttled. The referrers <code>items</code> list is capped, so for impact reports rely on <code>total_places</code> and walk your page list separately.</p>
<div class="callout info">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75.0 011.063.852l-.708 2.836a.75.75.0 001.063.853l.041-.021M21 12A9 9 0 113 12a9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"></path></svg><p>Rate limit</p>
    </div>
    <div class="callout-body">
        <p><span class="dark:text-gray-300 font-semibold gradient-text-aqua">50 requests per 10 seconds on the Marketer MCP server.</span>
<br/><br/>
Plan bulk SitecoreAI layout jobs around it.</p>
    </div>
</div>
<hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-security-considerations" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">🔐 Security Considerations</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<ul>
<li>🔑 <span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">Protect the client secret:</span> use a secret-type Postman variable or a vault, never a shared collection.</li>
<li>🛡️ <span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">Permissions still apply:</span> the Agent API follows SitecoreAI&rsquo;s built-in security and approval rules, and an AI client does not get extra access.</li>
<li>♻️ <span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Scope and rotate credentials:</span> create automation credentials for a specific purpose.</li>
<li>👀 <span class="dark:text-gray-300 font-semibold gradient-text-aqua">Review before publishing:</span> layout changes through the API are still changes to your content, subject to your workflow and publishing process.</li>
</ul>
<hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-troubleshooting" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">🛠️ Troubleshooting</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Symptom</th><th>Likely Cause And Fix</th></tr>
      </thead><tbody><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">401 Unauthorized</span></td><td>The JWT likely expired. Request a new one.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">403</span></td><td>Your role cannot update that page or item.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-aqua">404 on move</span></td><td>The page, component instance or anchor was not found. Re-fetch the page components.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">400 on move</span></td><td>The target placeholder does not allow that component. Check the allowed components for the placeholder.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">422</span></td><td>A field is missing or malformed. The error <code>detail</code> array points to the field.</td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-vital-ocean">New tools missing in your MCP client</span></td><td>Confirm you are signed in to the right tenant, refresh the connection, and check your role has access to the tools.</td></tr></tbody>
  
</table>
</div>
<hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-real-world-example-retiring-a-promo-banner" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">🧑‍💻 Real-world Example: Retiring a Promo Banner</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>Say a seasonal banner is ending and you want it gone from every SitecoreAI page that uses it.</p>
<ol>
<li><span class="dark:text-gray-300 font-semibold gradient-text-aqua">Create a job ID,</span> for example <code>retire-fall-promo-2026</code>.</li>
<li><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">Call the referrers endpoint</span> for the banner datasource. Read <code>total_places</code> and the <code>page_url</code> of each referrer.</li>
<li><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Remove the banner on each referencing page,</span> passing the same job ID. Log every <code>affectedExperiments</code> entry, because this is where you find the A/B test still pointing at it.</li>
<li><span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">Delete the datasource,</span> using <code>remove_references=true</code> only if you want the cascade. Read <code>affectedComponents</code> for any <code>removed: false</code> leftovers.</li>
<li><span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">Revert if needed.</span> If something looks wrong, call the revert endpoint for the job ID and start again.</li>
</ol>
<p>That is the same sequence an agent would follow through the MCP tools, only now you can see every step.</p>
<hr>
<p>







<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-frequently-asked-questions-faqs" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">💬 Frequently Asked Questions (FAQs)</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<br/></p>


          
          
          

          <div class="not-prose accordion-group " data-accordion-mode="single"
            data-first-open="false">
            


  
  
  
  
  

  
  

  <div class="accordion-item" data-open="">
    <h3 class="m-0"><button type="button" class="accordion-header" data-accordion-header aria-expanded="false"><span
      class="accordion-title font-display text-xl md:text-2xl font-bold gradient-text-electric-matrix">What changed in SitecoreAI Marketer MCP and Agent API on October 12, 2026?</span><svg class="accordion-icon"
      viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
      <path fill="currentColor"
        d="M505.755,123.592c-8.341-8.341-21.824-8.341-30.165,0L256.005,343.176L36.421,123.592c-8.341-8.341-21.824-8.341-30.165,0 s-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251c5.462,0,10.923-2.091,15.083-6.251l234.667-234.667 C514.096,145.416,514.096,131.933,505.755,123.592z">
      </path>
    </svg></button></h3>
    
    <div class="accordion-panel">
      <div>
        <div class="accordion-body pb-4 pr-8 text-base md:text-lg leading-relaxed text-gray-700 dark:text-gray-300">
          Sitecore added or enhanced five Marketer MCP tools in SitecoreAI: get_content_references, add_component_on_page, move_component_on_page, remove_component_on_page and delete_content, with matching Agent API endpoints. They add before/after component placement, repositioning, dependency checks, and safeguards for affected A/B tests.
        </div>
      </div>
    </div>
  </div>


  
  
  
  
  

  
  

  <div class="accordion-item" data-open="">
    <h3 class="m-0"><button type="button" class="accordion-header" data-accordion-header aria-expanded="false"><span
      class="accordion-title font-display text-xl md:text-2xl font-bold gradient-text-hyper-violet">How do I place a component before or after another in the SitecoreAI Agent API?</span><svg class="accordion-icon"
      viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
      <path fill="currentColor"
        d="M505.755,123.592c-8.341-8.341-21.824-8.341-30.165,0L256.005,343.176L36.421,123.592c-8.341-8.341-21.824-8.341-30.165,0 s-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251c5.462,0,10.923-2.091,15.083-6.251l234.667-234.667 C514.096,145.416,514.096,131.933,505.755,123.592z">
      </path>
    </svg></button></h3>
    
    <div class="accordion-panel">
      <div>
        <div class="accordion-body pb-4 pr-8 text-base md:text-lg leading-relaxed text-gray-700 dark:text-gray-300">
          Call POST /api/v1/pages/{pageId}/components and add insertBeforeComponentId or insertAfterComponentId with the instance ID of the component you want to anchor to.
        </div>
      </div>
    </div>
  </div>


  
  
  
  
  

  
  

  <div class="accordion-item" data-open="">
    <h3 class="m-0"><button type="button" class="accordion-header" data-accordion-header aria-expanded="false"><span
      class="accordion-title font-display text-xl md:text-2xl font-bold gradient-text-emerald-prism">What happens to an A/B test when I remove a component in SitecoreAI?</span><svg class="accordion-icon"
      viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
      <path fill="currentColor"
        d="M505.755,123.592c-8.341-8.341-21.824-8.341-30.165,0L256.005,343.176L36.421,123.592c-8.341-8.341-21.824-8.341-30.165,0 s-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251c5.462,0,10.923-2.091,15.083-6.251l234.667-234.667 C514.096,145.416,514.096,131.933,505.755,123.592z">
      </path>
    </svg></button></h3>
    
    <div class="accordion-panel">
      <div>
        <div class="accordion-body pb-4 pr-8 text-base md:text-lg leading-relaxed text-gray-700 dark:text-gray-300">
          The remove endpoint returns an affectedExperiments array listing A/B tests found on the component, with an archived flag showing whether that call archived each one. Check that array on every removal.
        </div>
      </div>
    </div>
  </div>


  
  
  
  
  

  
  

  <div class="accordion-item" data-open="">
    <h3 class="m-0"><button type="button" class="accordion-header" data-accordion-header aria-expanded="false"><span
      class="accordion-title font-display text-xl md:text-2xl font-bold gradient-text-solar-flare">How do I undo a bad change made by an AI agent in SitecoreAI?</span><svg class="accordion-icon"
      viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
      <path fill="currentColor"
        d="M505.755,123.592c-8.341-8.341-21.824-8.341-30.165,0L256.005,343.176L36.421,123.592c-8.341-8.341-21.824-8.341-30.165,0 s-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251c5.462,0,10.923-2.091,15.083-6.251l234.667-234.667 C514.096,145.416,514.096,131.933,505.755,123.592z">
      </path>
    </svg></button></h3>
    
    <div class="accordion-panel">
      <div>
        <div class="accordion-body pb-4 pr-8 text-base md:text-lg leading-relaxed text-gray-700 dark:text-gray-300">
          Send the same x-sc-job-id header on every mutating call, then use POST /api/v1/jobs/{jobId}/revert to restore the state before that job. GET /api/v1/jobs/{jobId}/operations lists what the job did.
        </div>
      </div>
    </div>
  </div>


  
  
  
  
  

  
  

  <div class="accordion-item" data-open="">
    <h3 class="m-0"><button type="button" class="accordion-header" data-accordion-header aria-expanded="false"><span
      class="accordion-title font-display text-xl md:text-2xl font-bold gradient-text-vital-ocean">Does the SitecoreAI Marketer MCP server need new setup for these tools?</span><svg class="accordion-icon"
      viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
      <path fill="currentColor"
        d="M505.755,123.592c-8.341-8.341-21.824-8.341-30.165,0L256.005,343.176L36.421,123.592c-8.341-8.341-21.824-8.341-30.165,0 s-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251c5.462,0,10.923-2.091,15.083-6.251l234.667-234.667 C514.096,145.416,514.096,131.933,505.755,123.592z">
      </path>
    </svg></button></h3>
    
    <div class="accordion-panel">
      <div>
        <div class="accordion-body pb-4 pr-8 text-base md:text-lg leading-relaxed text-gray-700 dark:text-gray-300">
          No new client setup is described. The Marketer MCP server uses the Agent API behind the scenes, and MCP clients discover its tools from the server, so an existing VS Code connection should list them once Sitecore enables them for your tenant.
        </div>
      </div>
    </div>
  </div>

          </div>

          
          
<br/>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-summary" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">🏁 Summary</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>The <a href="https://developers.sitecore.com/changelog/sitecoreai/12102026/improved-content-management-and-page-layout-control-in-marketer-mcp-and-agent-api" target="_blank" rel="noopener">October 12</a>
 update makes SitecoreAI page editing through the Agent API and Marketer MCP much more precise. You can anchor components before or after others, move them, see what references an item before deleting it, and revert a whole job if an agent gets it wrong.</p>
<div class="callout info">
    <div class="callout-head"><svg height=1.2em class="hx:inline-block hx:align-middle" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="22" height="22"><path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75.0 011.063.852l-.708 2.836a.75.75.0 001.063.853l.041-.021M21 12A9 9 0 113 12a9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"></path></svg><p>The one thing to remember</p>
    </div>
    <div class="callout-body">
        <p><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">The A/B test information in the REST responses is a report, not a block.</span>
<br/><br/>
Read <code>affectedExperiments</code> every time, and lean on the job ID and revert endpoint as your safety net.</p>
    </div>
</div>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-next-steps" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">➡️ Next Steps</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<ol>
<li>Build the Postman collection above against a non-production SitecoreAI site.</li>
<li>Run the retire-a-banner scenario end to end, including a revert.</li>
<li>Check your MCP client lists the five tools, and test how it handles the confirmation step.</li>
<li>Add a throttle to any bulk script.</li>
</ol>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-call-to-action" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">📣 Call To Action</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>
<p>If this saved you time, share it with your SitecoreAI team, and tell me which scenario you would like next. You can browse more in the <a href="https://www.amitk.net/tags/mcp/" target="_blank" rel="noopener">MCP article series</a>
 and follow along for the next SitecoreAI release breakdown.</p>
<hr>








<div class="flex items-center gap-2 flex-wrap mt-0 !mt-0 p-0" style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">
  
    <h2 id="-credit-and-references" class="mt-0 !mt-0 pt-0 pb-0 " style="margin-top:0.5em!important;margin-bottom:-0.3em!important;padding-top:0!important;">📚 Credit and References</h2>
  
  
    <span class="go-to-top">
      <a class="go-to-top-a " href="#TableOfContents" title="Go to Top"><svg height=1.2em class="hx:inline-block hx:align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M7 11l5-5m0 0l5 5m-5-5v12"/></svg></a>      
    </span>
  
</div>



<div class="table-wrapper">
<table class="style-table"><thead>
        <tr><th>Resource / Documentation</th><th>Description / Reference Link</th></tr>
      </thead><tbody><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-aqua">SitecoreAI Changelog</span></td><td><a href="https://developers.sitecore.com/changelog/sitecoreai/12102026/improved-content-management-and-page-layout-control-in-marketer-mcp-and-agent-api" target="_blank" rel="noopener">Improved content management and page layout control in Marketer MCP and Agent API</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">Sitecore Agent API</span></td><td><a href="https://api-docs.sitecore.com/sai/agent-api" target="_blank" rel="noopener">Agent API v2.0 Reference</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Agent API: Pages</span></td><td><a href="https://api-docs.sitecore.com/sai/agent-api/pages" target="_blank" rel="noopener">Add, move and remove components on a page</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">Agent API: Content</span></td><td><a href="https://api-docs.sitecore.com/sai/agent-api/content" target="_blank" rel="noopener">Referrers and delete content endpoints</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">Agent API: Jobs</span></td><td><a href="https://api-docs.sitecore.com/sai/agent-api/jobs" target="_blank" rel="noopener">Job operations and revert endpoints</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-vital-ocean">Marketer MCP Tool Reference</span></td><td><a href="https://doc.sitecore.com/sai/en/users/sitecoreai/sitecore-marketer-mcp-server/marketer-mcp-tool-reference-and-other-information.html" target="_blank" rel="noopener">Marketer MCP tool reference and other information</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-aqua">Sitecore Marketer MCP</span></td><td><a href="https://www.amitk.net/blog/sitecore-marketer-mcp-vscode-integration/" target="_blank" rel="noopener">Sitecore Marketer MCP &amp; VS Code Integration</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-emerald-prism">AI Architectural Taxonomy</span></td><td><a href="https://www.amitk.net/blog/mcp-server-vs-copilot-genai-agentic-ai/" target="_blank" rel="noopener">Why MCP Server Matters: Copilot vs GenAI vs Agentic AI vs AI Agents Explained</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-solar-flare">Custom .NET MCP Tools</span></td><td><a href="https://www.amitk.net/blog/build-custom-mcp-server-dotnet-csharp/" target="_blank" rel="noopener">Build Custom Sitecore MCP Tools in .NET C#</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-hyper-violet">Serverless MCP Tools</span></td><td><a href="https://www.amitk.net/blog/build-custom-dotnet-mcp-tools-azure-functions-dataverse" target="_blank" rel="noopener">Build .NET MCP Tools with Azure Functions and Dataverse</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-electric-matrix">SitecoreAI APIs</span></td><td><a href="https://www.amitk.net/blog/sitecoreai-api-guide-rest-graphql-mcp-edge-admin/" target="_blank" rel="noopener">SitecoreAI APIs Explained: Content REST APIs vs GraphQL vs MCP vs Edge Admin</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-vital-ocean">Marketer MCP at Scale</span></td><td><a href="https://www.amitk.net/blog/sitecoreai-marketer-mcp-setup-guide/" target="_blank" rel="noopener">How to Scale SitecoreAI Marketer MCP Across Copilot Studio, Postman, and Codex</a></td></tr><tr><td><span class="dark:text-gray-300 font-semibold gradient-text-aqua">Prompts and Config</span></td><td><a href="https://github.com/AmitKumar-AK/sitecore-marketer-mcp-prompts" target="_blank" rel="noopener">Sitecore Marketer MCP Prompts &amp; VS Code Integration (GitHub)</a></td></tr></tbody>
  
</table>
</div>
]]></content:encoded></item></channel></rss>