<?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/">
  <channel>
    <title>nodejs word annotations on Document Processing REST APIs | GroupDocs Cloud</title>
    <link>https://blog-qa.groupdocs.cloud/tag/nodejs-word-annotations/</link>
    <description>Recent content in nodejs word annotations on Document Processing REST APIs | GroupDocs Cloud</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 05 Oct 2026 16:29:28 +0000</lastBuildDate><atom:link href="https://blog-qa.groupdocs.cloud/tag/nodejs-word-annotations/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Create Sticky Notes on Word Pages in Node.JS</title>
      <link>https://blog-qa.groupdocs.cloud/annotation/create-sticky-notes-on-word-pages-in-nodejs/</link>
      <pubDate>Mon, 05 Oct 2026 16:29:28 +0000</pubDate>
      
      <guid>https://blog-qa.groupdocs.cloud/annotation/create-sticky-notes-on-word-pages-in-nodejs/</guid>
      <description>Learn how to create Sticky Notes on Word pages in Node.JS using GroupDocs.Annotation Cloud SDK. Step-by-step guide, code example, and REST cURL commands.</description>
      <content:encoded><![CDATA[<p>Adding quick comments directly onto Word documents is a common requirement for collaborative review workflows. <a href="https://products.groupdocs.cloud/annotation/nodejs/">GroupDocs.Annotation Cloud SDK for Node.JS</a> lets you programmatically add rich annotations without leaving your server environment. In this guide we will show you how to create Sticky Notes on Word pages in Node.JS, covering setup, a detailed walkthrough, a complete code example, and equivalent cURL calls.</p>
<h2 id="setting-up-groupdocsannotation-cloud-sdk-for-nodejs">Setting Up GroupDocs.Annotation Cloud SDK for Node.JS</h2>
<p>Before you start, make sure you have:</p>
<ul>
<li>Node.js 14+ and npm installed</li>
<li>A GroupDocs cloud account with <strong>clientId</strong> and <strong>clientSecret</strong></li>
<li>Access to the source <a href="https://docs.fileformat.com/word-processing/docx/">DOCX</a> file you want to annotate</li>
</ul>
<p>Install the SDK via npm:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>npm install groupdocs-annotation-cloud
</span></span></code></pre></div><p>Download the latest package from the official release page if you prefer a manual install: <a href="https://releases.groupdocs.cloud/annotation/nodejs/">GroupDocs.Annotation Cloud SDK for Node.JS Download</a>.</p>
<p>Create a configuration object with your credentials (excerpt from the full example):</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> { <span style="color:#a6e22e">Configuration</span> } <span style="color:#f92672">=</span> <span style="color:#a6e22e">require</span>(<span style="color:#e6db74">&#34;@groupdocs.annotation-cloud&#34;</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">config</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">Configuration</span>({
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">clientId</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;YOUR_CLIENT_ID&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">clientSecret</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;YOUR_CLIENT_SECRET&#34;</span>
</span></span><span style="display:flex;"><span>});
</span></span></code></pre></div><p>With the SDK installed and credentials ready, we can move on to the implementation.</p>
<h2 id="create-sticky-notes-on-word-pages-in-nodejs-step-by-step-walkthrough">Create Sticky Notes on Word Pages in Node.JS: Step-by-Step Walkthrough</h2>
<p>In this walkthrough we will create Sticky Notes on Word pages in Node.JS using the SDK&rsquo;s annotation classes.</p>
<h3 id="step-1-initialize-the-annotation-api">Step 1: Initialize the Annotation API</h3>
<p>First, import the required classes and create an instance of <strong>AnnotateApi</strong>.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> { <span style="color:#a6e22e">AnnotateApi</span>, <span style="color:#a6e22e">models</span> } <span style="color:#f92672">=</span> <span style="color:#a6e22e">require</span>(<span style="color:#e6db74">&#34;@groupdocs.annotation-cloud&#34;</span>);
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">annotateApi</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">AnnotateApi</span>(<span style="color:#a6e22e">config</span>);
</span></span></code></pre></div><h3 id="step-2-define-source-and-destination-files">Step 2: Define Source and Destination Files</h3>
<p>Specify the input DOCX and the path for the annotated output.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">inputFilePath</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;sample.docx&#34;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">outputFilePath</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;sample_annotated.docx&#34;</span>;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">fileInfo</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">models</span>.<span style="color:#a6e22e">FileInfo</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">fileInfo</span>.<span style="color:#a6e22e">filePath</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">inputFilePath</span>;
</span></span></code></pre></div><h3 id="step-3-set-up-the-sticky-note-position">Step 3: Set Up the Sticky Note Position</h3>
<p>Create a <strong>Rectangle</strong> that determines where the sticky note will appear on page 1.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">rect</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">models</span>.<span style="color:#a6e22e">Rectangle</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">rect</span>.<span style="color:#a6e22e">x</span> <span style="color:#f92672">=</span> <span style="color:#ae81ff">100</span>;      <span style="color:#75715e">// distance from left edge (points)
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">rect</span>.<span style="color:#a6e22e">y</span> <span style="color:#f92672">=</span> <span style="color:#ae81ff">100</span>;      <span style="color:#75715e">// distance from top edge (points)
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">rect</span>.<span style="color:#a6e22e">width</span> <span style="color:#f92672">=</span> <span style="color:#ae81ff">200</span>;  <span style="color:#75715e">// width of the sticky note
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">rect</span>.<span style="color:#a6e22e">height</span> <span style="color:#f92672">=</span> <span style="color:#ae81ff">100</span>; <span style="color:#75715e">// height of the sticky note
</span></span></span></code></pre></div><h3 id="step-4-build-the-sticky-note-annotation-object">Step 4: Build the Sticky Note Annotation Object</h3>
<p>Configure the annotation type, page number, rectangle, text, and background color.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">stickyNote</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">models</span>.<span style="color:#a6e22e">AnnotationInfo</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">stickyNote</span>.<span style="color:#a6e22e">annotationType</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;StickyNote&#34;</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">stickyNote</span>.<span style="color:#a6e22e">pageNumber</span> <span style="color:#f92672">=</span> <span style="color:#ae81ff">1</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">stickyNote</span>.<span style="color:#a6e22e">rect</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">rect</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">stickyNote</span>.<span style="color:#a6e22e">text</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;This is a sticky note added via GroupDocs.Annotation Cloud SDK.&#34;</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">stickyNote</span>.<span style="color:#a6e22e">color</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;FFFF00&#34;</span>; <span style="color:#75715e">// Yellow background
</span></span></span></code></pre></div><h3 id="step-5-execute-the-annotation-request">Step 5: Execute the Annotation Request</h3>
<p>Assemble the request options and call the <strong>annotate</strong> method.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">annotateOptions</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">models</span>.<span style="color:#a6e22e">AnnotateOptions</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">annotateOptions</span>.<span style="color:#a6e22e">fileInfo</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">fileInfo</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">annotateOptions</span>.<span style="color:#a6e22e">annotations</span> <span style="color:#f92672">=</span> [<span style="color:#a6e22e">stickyNote</span>];
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">annotateOptions</span>.<span style="color:#a6e22e">outputPath</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">outputFilePath</span>;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>(<span style="color:#66d9ef">async</span> () =&gt; {
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">try</span> {
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">request</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">models</span>.<span style="color:#a6e22e">AnnotateRequest</span>(<span style="color:#a6e22e">annotateOptions</span>);
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">response</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> <span style="color:#a6e22e">annotateApi</span>.<span style="color:#a6e22e">annotate</span>(<span style="color:#a6e22e">request</span>);
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">log</span>(<span style="color:#e6db74">&#34;Sticky note created successfully. Output saved to:&#34;</span>, <span style="color:#a6e22e">response</span>.<span style="color:#a6e22e">path</span>);
</span></span><span style="display:flex;"><span>    } <span style="color:#66d9ef">catch</span> (<span style="color:#a6e22e">err</span>) {
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">error</span>(<span style="color:#e6db74">&#34;Failed to create sticky note:&#34;</span>, <span style="color:#a6e22e">err</span>);
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>})();
</span></span></code></pre></div><h2 id="full-working-example-for-create-sticky-notes-on-word-pages-in-nodejs">Full Working Example for Create Sticky Notes on Word Pages in Node.JS</h2>
<p>The following example demonstrates the complete implementation for creating Sticky Notes on Word pages in Node.JS using GroupDocs.Annotation Cloud SDK.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> { <span style="color:#a6e22e">AnnotateApi</span>, <span style="color:#a6e22e">Configuration</span>, <span style="color:#a6e22e">models</span> } <span style="color:#f92672">=</span> <span style="color:#a6e22e">require</span>(<span style="color:#e6db74">&#34;@groupdocs.annotation-cloud&#34;</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// Configuration – replace with your actual GroupDocs credentials
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">config</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">Configuration</span>({
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">clientId</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;YOUR_CLIENT_ID&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">clientSecret</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;YOUR_CLIENT_SECRET&#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:#66d9ef">const</span> <span style="color:#a6e22e">annotateApi</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">AnnotateApi</span>(<span style="color:#a6e22e">config</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// Define input and output files
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">inputFilePath</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;sample.docx&#34;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">outputFilePath</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;sample_annotated.docx&#34;</span>;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// Build FileInfo object for the source document
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">fileInfo</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">models</span>.<span style="color:#a6e22e">FileInfo</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">fileInfo</span>.<span style="color:#a6e22e">filePath</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">inputFilePath</span>;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// Define rectangle (position &amp; size) for the sticky note on page 1
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">rect</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">models</span>.<span style="color:#a6e22e">Rectangle</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">rect</span>.<span style="color:#a6e22e">x</span> <span style="color:#f92672">=</span> <span style="color:#ae81ff">100</span>;      <span style="color:#75715e">// distance from left edge (points)
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">rect</span>.<span style="color:#a6e22e">y</span> <span style="color:#f92672">=</span> <span style="color:#ae81ff">100</span>;      <span style="color:#75715e">// distance from top edge (points)
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">rect</span>.<span style="color:#a6e22e">width</span> <span style="color:#f92672">=</span> <span style="color:#ae81ff">200</span>;  <span style="color:#75715e">// width of the sticky note
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">rect</span>.<span style="color:#a6e22e">height</span> <span style="color:#f92672">=</span> <span style="color:#ae81ff">100</span>; <span style="color:#75715e">// height of the sticky note
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// Create the sticky‑note annotation
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">stickyNote</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">models</span>.<span style="color:#a6e22e">AnnotationInfo</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">stickyNote</span>.<span style="color:#a6e22e">annotationType</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;StickyNote&#34;</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">stickyNote</span>.<span style="color:#a6e22e">pageNumber</span> <span style="color:#f92672">=</span> <span style="color:#ae81ff">1</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">stickyNote</span>.<span style="color:#a6e22e">rect</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">rect</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">stickyNote</span>.<span style="color:#a6e22e">text</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;This is a sticky note added via GroupDocs.Annotation Cloud SDK.&#34;</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">stickyNote</span>.<span style="color:#a6e22e">color</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;FFFF00&#34;</span>; <span style="color:#75715e">// Yellow background
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// Assemble the annotate request options
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">annotateOptions</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">models</span>.<span style="color:#a6e22e">AnnotateOptions</span>();
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">annotateOptions</span>.<span style="color:#a6e22e">fileInfo</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">fileInfo</span>;
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">annotateOptions</span>.<span style="color:#a6e22e">annotations</span> <span style="color:#f92672">=</span> [<span style="color:#a6e22e">stickyNote</span>];
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">annotateOptions</span>.<span style="color:#a6e22e">outputPath</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">outputFilePath</span>;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// Execute the request
</span></span></span><span style="display:flex;"><span><span style="color:#75715e">// -----------------------------------------------------------------------------
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>(<span style="color:#66d9ef">async</span> () =&gt; {
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">try</span> {
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">request</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">models</span>.<span style="color:#a6e22e">AnnotateRequest</span>(<span style="color:#a6e22e">annotateOptions</span>);
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">response</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> <span style="color:#a6e22e">annotateApi</span>.<span style="color:#a6e22e">annotate</span>(<span style="color:#a6e22e">request</span>);
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">log</span>(<span style="color:#e6db74">&#34;Sticky note created successfully. Output saved to:&#34;</span>, <span style="color:#a6e22e">response</span>.<span style="color:#a6e22e">path</span>);
</span></span><span style="display:flex;"><span>    } <span style="color:#66d9ef">catch</span> (<span style="color:#a6e22e">err</span>) {
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">error</span>(<span style="color:#e6db74">&#34;Failed to create sticky note:&#34;</span>, <span style="color:#a6e22e">err</span>);
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>})();
</span></span></code></pre></div><blockquote>
<p><strong>Note:</strong> This code example demonstrates the core functionality. Before using it in your project, make sure to update any file paths and configuration values to match your actual environment, verify that all required dependencies are properly installed, and test thoroughly in your development environment. If you encounter any issues, please refer to the <a href="https://docs.groupdocs.cloud/annotation/">official documentation</a> or reach out to the <a href="https://forum.groupdocs.cloud/c/annotation/10">support team</a> for assistance.</p>
</blockquote>
<h2 id="adding-sticky-note-annotations-with-curl-and-the-rest-api">Adding Sticky Note Annotations with cURL and the REST API</h2>
<p>The REST API offers the same capability without writing code. Below are the required cURL calls.</p>
<p>First, obtain an access token:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0.0/auth/token&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Content-Type: application/json&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -d <span style="color:#e6db74">&#39;{&#34;client_id&#34;:&#34;YOUR_CLIENT_ID&#34;,&#34;client_secret&#34;:&#34;YOUR_CLIENT_SECRET&#34;}&#39;</span>
</span></span></code></pre></div><p>Upload the source DOCX file (replace <strong>YOUR_ACCESS_TOKEN</strong> with the token from the previous step):</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X PUT <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0.0/storage/file/sample.docx&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Content-Type: application/octet-stream&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     --data-binary @sample.docx
</span></span></code></pre></div><p>Create the sticky note annotation:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0.0/annotation/annotate&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Content-Type: application/json&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -d <span style="color:#e6db74">&#39;{
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;fileInfo&#34;: { &#34;filePath&#34;: &#34;sample.docx&#34; },
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;annotations&#34;: [
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">               {
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">                   &#34;annotationType&#34;: &#34;StickyNote&#34;,
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">                   &#34;pageNumber&#34;: 1,
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">                   &#34;rect&#34;: { &#34;x&#34;: 100, &#34;y&#34;: 100, &#34;width&#34;: 200, &#34;height&#34;: 100 },
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">                   &#34;text&#34;: &#34;This is a sticky note added via GroupDocs.Annotation Cloud SDK.&#34;,
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">                   &#34;color&#34;: &#34;FFFF00&#34;
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">               }
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           ],
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;outputPath&#34;: &#34;sample_annotated.docx&#34;
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">         }&#39;</span>
</span></span></code></pre></div><p>Download the annotated document:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X GET <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0.0/storage/file/sample_annotated.docx?download=true&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -o sample_annotated.docx
</span></span></code></pre></div><p>For more details on request payloads, see the <a href="https://reference.groupdocs.cloud/annotation/">API reference</a>.</p>
<h2 id="configuring-annotation-options-for-sticky-notes">Configuring Annotation Options for Sticky Notes</h2>
<p>The SDK exposes several properties that let you fine‑tune the sticky note appearance and behavior:</p>
<ul>
<li><strong>annotationType</strong> - must be set to <code>&quot;StickyNote&quot;</code> (required).</li>
<li><strong>pageNumber</strong> - the page where the note will appear.</li>
<li><strong>rect</strong> - defines position (<code>x</code>, <code>y</code>) and size (<code>width</code>, <code>height</code>). Adjust these values to control placement.</li>
<li><strong>text</strong> - the note content.</li>
<li><strong>color</strong> - background color in HEX (e.g., <code>&quot;FFFF00&quot;</code> for yellow).</li>
</ul>
<p>You can also set optional fields such as <strong>author</strong>, <strong>fontFamily</strong>, or <strong>opacity</strong> via the <strong>AnnotationInfo</strong> model. Refer to the <a href="https://reference.groupdocs.cloud/annotation/">API reference</a> for the complete list of configurable properties.</p>
<h2 id="conclusion">Conclusion</h2>
<p>By following the steps above you now know how to create Sticky Notes on Word pages in Node.JS using GroupDocs.Annotation Cloud SDK. Whether you prefer a native Node.js implementation or a REST‑based cURL workflow, the SDK provides a consistent and reliable way to annotate DOCX files programmatically. Remember to apply a valid license for production use; you can obtain a temporary license from the <a href="https://purchase.groupdocs.cloud/temporary-license/">license page</a> or review pricing options on the product page. Happy annotating!</p>
<h2 id="faqs">FAQs</h2>
<ul>
<li>
<p><strong>How can I create Sticky Notes on Word pages in Node.JS using GroupDocs.Annotation Cloud SDK?</strong><br>
Use the <strong>AnnotateApi</strong> as demonstrated in the code example. The SDK handles file access, annotation creation, and output generation automatically.</p>
</li>
<li>
<p><strong>What file formats are supported for annotation with the SDK?</strong><br>
The SDK works with DOCX, <a href="https://docs.fileformat.com/pdf">PDF</a>, <a href="https://docs.fileformat.com/presentation/pptx/">PPTX</a>, <a href="https://docs.fileformat.com/spreadsheet/xlsx/">XLSX</a>, and many other popular formats. See the full list in the <a href="https://docs.groupdocs.cloud/annotation/">official documentation</a>.</p>
</li>
<li>
<p><strong>How do I authenticate when using the REST API for sticky notes?</strong><br>
Obtain an access token via the <code>/auth/token</code> endpoint using your client credentials, then include the token in the <code>Authorization: Bearer</code> header for all subsequent calls. Detailed steps are in the <a href="https://reference.groupdocs.cloud/annotation/">API reference</a>.</p>
</li>
<li>
<p><strong>Can I customize the sticky note color or size?</strong><br>
Yes. Set the <code>color</code> property to a HEX value and adjust the <code>rect</code> dimensions (<code>width</code>, <code>height</code>) to control the note&rsquo;s size and placement.</p>
</li>
</ul>
<h2 id="read-more">Read More</h2>
<ul>
<li><a href="https://blog.groupdocs.cloud/annotation/strikethrough-text-in-a-pdf-using-nodejs/">Strikethrough Text in a PDF with Node.js and REST API</a></li>
<li><a href="https://blog.groupdocs.cloud/annotation/add-annotations-in-word-documents-using-a-rest-api-in-node-js/">Add Annotations in Word Documents using REST API in Node.js</a></li>
<li><a href="https://blog.groupdocs.cloud/annotation/annotate-docx-files-using-python/">Annotate Word Files using Python</a></li>
</ul>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
