GroupDocs.Annotation Cloud is an enterprise-grade REST API for adding annotations and comments to documents. Highlight areas, draw shapes, leave sticky notes, and collaborate on Word, PDF, Excel, PowerPoint, images, and more — with no third-party desktop software.
SDKs are grouped by platform. Each example adds an area annotation to a document using the Area Annotation API. The same call is shown first as plain REST (cURL), then for each SDK.
Call the Annotation Cloud REST API directly (no SDK). Obtain a JWT from the token endpoint (client_credentials), then annotate:
# Get JWT (Client Id / Client Secret from https://dashboard.groupdocs.cloud)
curl -v "https://api.groupdocs.cloud/connect/token" \
-X POST \
-d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json"
# Add area annotation
curl -v "https://api.groupdocs.cloud/v2.0/annotation/add" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $JWT_TOKEN" \
-d '{
"FileInfo": {
"FilePath": "annotationdocs/one-page.docx"
},
"OutputPath": "Output/output.docx",
"Annotations": [
{
"Type": "Area",
"Text": "This is area annotation",
"CreatorName": "Anonym A.",
"Box": {
"X": 100,
"Y": 100,
"Width": 100,
"Height": 100
},
"PageNumber": 0,
"AnnotationPosition": {
"X": 1,
"Y": 1
},
"Replies": [
{
"Comment": "First comment",
"RepliedOn": "2020-10-02T06:52:01.376Z"
},
{
"Comment": "Second comment",
"RepliedOn": "2020-10-02T06:52:01.376Z"
}
],
"CreatedOn": "2020-10-02T06:52:01.376Z",
"PenStyle": "Solid",
"PenColor": 65535,
"PenWidth": 3,
"BackgroundColor": 65535,
"Opacity": 0.7
}
]
}'See more: Area Annotation (cURL example).
.NET SDK for GroupDocs.Annotation Cloud — .NET Core and .NET Framework.
var configuration = new Configuration(MyClientId, MyClientSecret);
var apiInstance = new AnnotateApi(configuration);
var fileInfo = new FileInfo { FilePath = "one-page.docx" };
var annotations = new[]
{
new AnnotationInfo
{
AnnotationPosition = new Point { X = 1, Y = 1 },
Box = new Rectangle { X = 100, Y = 100, Width = 100, Height = 100 },
PageNumber = 0,
BackgroundColor = 65535,
PenColor = 65535,
PenStyle = AnnotationInfo.PenStyleEnum.Solid,
PenWidth = 3,
Type = AnnotationInfo.TypeEnum.Area,
Text = "This is area annotation",
CreatorName = "Anonym A."
}
};
var options = new AnnotateOptions
{
FileInfo = fileInfo,
Annotations = annotations.ToList(),
OutputPath = "Output/output.docx"
};
var link = apiInstance.Annotate(new AnnotateRequest(options));Java SDK for the GroupDocs.Annotation Cloud REST API.
- groupdocs-annotation-cloud-java — SDK
- groupdocs-annotation-cloud-java-samples — Examples
Configuration configuration = new Configuration(MyClientId, MyClientSecret);
AnnotateApi apiInstance = new AnnotateApi(configuration);
AnnotationInfo annotation = new AnnotationInfo();
Point pt = new Point();
pt.setX(1.0);
pt.setY(1.0);
annotation.setAnnotationPosition(pt);
Rectangle box = new Rectangle();
box.setX(100.0);
box.setY(100.0);
box.setWidth(200.0);
box.setHeight(100.0);
annotation.setBox(box);
annotation.setPageNumber(0);
annotation.setType(TypeEnum.AREA);
annotation.setText("This is area annotation");
annotation.setCreatorName("Anonym A.");
FileInfo fileInfo = new FileInfo();
fileInfo.setFilePath("one-page.docx");
AnnotateOptions options = new AnnotateOptions();
options.setFileInfo(fileInfo);
options.setAnnotations(Arrays.asList(annotation));
options.setOutputPath("Output/output.docx");
AnnotationApiLink result = apiInstance.annotate(new AnnotateRequest(options));PHP SDK for the GroupDocs.Annotation Cloud REST API.
- groupdocs-annotation-cloud-php — SDK
- groupdocs-annotation-cloud-php-samples — Examples
use GroupDocs\Annotation\Model;
use GroupDocs\Annotation\Model\Requests;
$configuration = new GroupDocs\Annotation\Configuration();
$configuration->setAppSid($ClientId);
$configuration->setAppKey($ClientSecret);
$apiInstance = new GroupDocs\Annotation\AnnotateApi($configuration);
$a = new Model\AnnotationInfo();
$pt = new Model\Point();
$pt->setX(1);
$pt->setY(1);
$a->setAnnotationPosition($pt);
$box = new Model\Rectangle();
$box->setX(100);
$box->setY(100);
$box->setWidth(200);
$box->setHeight(100);
$a->setBox($box);
$a->setPageNumber(0);
$a->setType(Model\AnnotationInfo::TYPE_AREA);
$a->setText("This is area annotation");
$a->setCreatorName("Anonym A.");
$fileInfo = new Model\FileInfo();
$fileInfo->setFilePath("one-page.docx");
$options = new Model\AnnotateOptions();
$options->setFileInfo($fileInfo);
$options->setAnnotations([$a]);
$options->setOutputPath("Output/output.docx");
$result = $apiInstance->annotate(new Requests\annotateRequest($options));Node.js SDK for the GroupDocs.Annotation Cloud REST API.
- groupdocs-annotation-cloud-node — SDK
- groupdocs-annotation-cloud-node-samples — Examples
const annotation_cloud = require("groupdocs-annotation-cloud");
const annotateApi = annotation_cloud.AnnotateApi.fromKeys(clientId, clientSecret);
let a1 = new annotation_cloud.AnnotationInfo();
a1.annotationPosition = new annotation_cloud.Point();
a1.annotationPosition.x = 1;
a1.annotationPosition.y = 1;
a1.box = new annotation_cloud.Rectangle();
a1.box.x = 100;
a1.box.y = 100;
a1.box.width = 200;
a1.box.height = 100;
a1.pageNumber = 0;
a1.type = annotation_cloud.AnnotationInfo.TypeEnum.Area;
a1.text = "This is area annotation";
a1.creatorName = "Anonym A.";
let fileInfo = new annotation_cloud.FileInfo();
fileInfo.filePath = "one-page.docx";
let options = new annotation_cloud.AnnotateOptions();
options.fileInfo = fileInfo;
options.annotations = [a1];
options.outputPath = "Output/output.docx";
let result = await annotateApi.annotate(new annotation_cloud.AnnotateRequest(options));Python SDK for the GroupDocs.Annotation Cloud REST API.
import groupdocs_annotation_cloud
api = groupdocs_annotation_cloud.AnnotateApi.from_keys(client_id, client_secret)
a1 = groupdocs_annotation_cloud.AnnotationInfo()
a1.annotation_position = groupdocs_annotation_cloud.Point()
a1.annotation_position.x = 1
a1.annotation_position.y = 1
a1.box = groupdocs_annotation_cloud.Rectangle()
a1.box.x = 100
a1.box.y = 100
a1.box.width = 200
a1.box.height = 100
a1.page_number = 0
a1.type = "Area"
a1.text = "This is area annotation"
a1.creator_name = "Anonym A."
file_info = groupdocs_annotation_cloud.FileInfo()
file_info.file_path = "one-page.docx"
options = groupdocs_annotation_cloud.AnnotateOptions()
options.file_info = file_info
options.annotations = [a1]
options.output_path = "Output/output.docx"
result = api.annotate(groupdocs_annotation_cloud.AnnotateRequest(options))Ruby SDK for the GroupDocs.Annotation Cloud REST API.
- groupdocs-annotation-cloud-ruby — SDK
- groupdocs-annotation-cloud-ruby-samples — Examples
require 'groupdocs_annotation_cloud'
api = GroupDocsAnnotationCloud::AnnotateApi.from_keys($client_id, $client_secret)
a1 = GroupDocsAnnotationCloud::AnnotationInfo.new
a1.annotation_position = GroupDocsAnnotationCloud::Point.new
a1.annotation_position.x = 1
a1.annotation_position.y = 1
a1.box = GroupDocsAnnotationCloud::Rectangle.new
a1.box.x = 100
a1.box.y = 100
a1.box.width = 200
a1.box.height = 100
a1.page_number = 0
a1.type = "Area"
a1.text = "This is area annotation"
a1.creator_name = "Anonym A."
file_info = GroupDocsAnnotationCloud::FileInfo.new
file_info.file_path = "one-page.docx"
options = GroupDocsAnnotationCloud::AnnotateOptions.new
options.file_info = file_info
options.annotations = [a1]
options.output_path = "Output/output.docx"
result = api.annotate(GroupDocsAnnotationCloud::AnnotateRequest.new(options))- Document review — Mark regions that need revision and attach threaded comments.
- Legal redlines — Highlight clauses for counsel feedback before signing.
- QA markup — Annotate screenshots and PDFs during product acceptance testing.
- Training materials — Call out UI areas or paragraphs in instructional documents.
- Remote collaboration — Collect reviewer notes without circulating desktop-only files.
Use Client ID and Client Secret from GroupDocs Cloud Dashboard to authenticate. Set them in your SDK configuration (e.g. Configuration, from_keys, or environment variables) before calling the API.
| Feature | Description |
|---|---|
| Rich annotation types | Area, arrow, distance, ellipse, point, polyline, text, watermark, and more. |
| Replies & collaboration | Attach comments and reply threads to annotations. |
| Broad format support | Word, PDF, Excel, PowerPoint, images, and related formats. |
| Import & export | Add, list, and remove annotations; download annotated results. |
| Cloud storage | Upload, download, and manage files used by annotation operations. |
| Cross-platform SDKs | .NET, Java, PHP, Node.js, Python, and Ruby clients. |
| Resource | Link |
|---|---|
| Documentation | GroupDocs.Annotation Cloud Docs — guides, API reference, and SDK usage. |
| Support forum | GroupDocs Cloud Free Support Forum — ask questions and report issues. |
| Temporary license | Get a free trial — full-feature evaluation. |
| Live demo | GroupDocs.Annotation apps — try annotations in the browser. |
| API reference | REST API Reference — Swagger/OpenAPI. |
document-annotation area-annotation pdf-annotation word-annotation markup-api document-comments highlight-document review-collaboration annotation-api groupdocs-annotation-cloud annotation-sdk