Skip to main content

Annotations API

The Annotations API makes it easy to add, read, and delete annotations on documents in Aprimo. You just provide the required properties in JSON, and Aprimo will generate and store the correct Annotation format automatically.

This makes it simpler and faster to integrate annotations into your applications.


Supported Annotation Types

The first release supports these annotation tools:

  • Rectangle
  • Highlight
  • Strikeout

Future updates may include additional tools, replies, and the ability to edit existing annotations.


How It Works

When you create an annotation, you’ll provide a JSON payload describing:

  • Type – The tool you’re using (rectangle, highlight, strikeout).
  • Page – Which page of the document the annotation belongs to.
  • Author – The user who created the annotation.
  • Geometry – The bounding box (and, if needed, quads for text highlights/strikeouts).
  • Style – Visual options like color, width, or opacity.
  • Content – The annotation comment, optional quoted text, or labels.
  • Reference Link – Optional link to another Aprimo asset.

Aprimo then converts this request into an annotation string behind the scenes and saves it.


Annotation Configuration

The Annotations API supports three tools: Rectangle, Highlight, and Strikeout.
Each tool requires a different combination of geometry, style, and content properties.

Common Fields (All Annotation Types)

Every annotation request requires these fields:

PropertyTypeRequiredNotes
typestringMust be one of: rectangle, highlight, strikeout
pageintegerPage number (0-indexed)
authorIdintegerAprimo user ID of the creator. If this is an application user, they can modify the annotation in the UI
geometryobjectDefines the position of the annotation (bounding box and/or quads)
styleobjectDefines visual style such as color, width, or opacity
contentobjectThe text/comment content of the annotation
referenceLinkobjectOptional link to a reference document in the DAM

Rectangle Annotation Fields

Use a rectangle to mark areas on a page.

Required Fields:

  • geometry.boundingBox – the Rectangle’s position
  • style.color – Hex color string
  • style.width – Line Thickness (1–20)

Optional Fields:

  • content.comment – Max of 3700 characters
  • content.fixedLabel – Max of 120 characters. Fixed data, not editable in the UI
  • referenceLink – Optional link to a reference document in the DAM

Highlight Annotation Fields

Use a highlight to mark text passages.

Required Fields:

  • geometry.boundingBox – Bounding area around the highlight
  • geometry.quads – Array of coordinates for each text segment
  • style.color – Hex color string
  • style.opacity – Transparency Level (0.0–1.0)

Optional Fields:

  • content.comment – Max of 3700 characters
  • content.quotedText – Max of 3700 characters. Fixed data, not editable in the UI
  • content.fixedLabel – Max of 120 characters. Fixed data, not editable in the UI
  • referenceLink – Optional link to a reference document in the DAM

Strikeout Annotation Fields

Use strikeout to mark text that should be removed or ignored.

Required Fields:

  • geometry.boundingBox – Bounding area around the strikeout
  • geometry.quads – Array of coordinates for each text segment
  • style.color – Hex color string

Optional Fields:

  • content.comment – Max of 3700 characters
  • content.quotedText – Max of 3700 characters. Fixed data, not editable in the UI
  • content.fixedLabel – Max of 120 characters. Fixed data, not editable in the UI
  • referenceLink – Optional link to a reference document in the DAM

Geometry Details

Bounding Box

PropertyTypeNotes
leftfloatLower-left X
bottomfloatLower-left Y
rightfloatUpper-right X
topfloatUpper-right Y

Quads Each quad describes a four-point polygon around a text segment.

PropertyTypeNotes
x1,y1doubleTop-left corner
x2,y2doubleTop-right corner
x3,y3doubleBottom-right corner
x4,y4doubleBottom-left corner

Style

PropertyTypeNotes
colorstringHex color string
widthinteger1 - 20
opacitydouble0.00 - 1.00

Content

PropertyTypeNotes
commentstringSupports linebreak characters
quotedTextstringMax of 3700 characters. Fixed data, not editable in the UI
fixedLabelstringMax of 120 characters. Fixed data, not editable in the UI
PropertyTypeNotes
documentUuidstringRecord ID of a DAM Asset

Response Payload

When you create or fetch an annotation, the API returns:

PropertyTypeNotes
annotationIdintegerUnique ID for the annotation
authorIdintegerUser ID of the creator
associatedNumberintegerannotation number on the document
createdDatedatetimeWhen the annotation was created
modifiedDatedatetimeWhen the annotation was last modified
typestringrectangle, highlight, or strikeout
pageintegerPage number (0-indexed)
geometryobjectGeometry details
styleobjectStyle details
contentobjectannotation content
referenceLinkobjectLinked DAM Asset (if any)
replyCountintegerNumber of replies (including status changes)

Derived Annotation Values

These values are automatically generated by Aprimo when saving the annotation:

PropertySourceNotes
nameauto-generated GUIDUnique identifier
subjecttype of annotationRectangle, Highlight, Strikeout
creationdatecurrent datetimeWhen annotation was created
datecurrent datetimeWhen annotation was created or edited
flags"print"Fixed value
dashes""Fixed value

Example Requests

Create a Rectangle

POST /api/assets/{id}/versions/{versionId}/annotations-data

{
"type": "rectangle",
"page": 3,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 27.44,
"bottom": 220.16,
"right": 358.12,
"top": 456.98
}
},
"style": {
"color": "#C544CE",
"width": 4
},
"content": {
"comment": "This is the main text of the annotation",
"fixedLabel": "Created by API"
},
"referenceLink": {
"documentUuid": "25E4AF5A-6DB3-72DC-F5F1-E18F32627863"
}
}

Create a Highlight

POST /api/assets/{id}/versions/{versionId}/annotations-data

{
"type": "highlight",
"page": 6,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 67.876,
"bottom": 622.707,
"right": 418.453,
"top": 724.882
},
"quads": [{
"x1": 67.87, "y1": 724.88,
"x2": 263.80, "y2": 724.88,
"x3": 67.87, "y3": 694.70,
"x4": 263.80, "y4": 694.70
}]
},
"style": {
"color": "#C544CE",
"opacity": 0.65
},
"content": {
"comment": "This is the main comment of the annotation",
"quotedText": "Poor UX: Slow Performance, Crashing, and Inaccurate Rendering",
"fixedLabel": "Created by API"
},
"referenceLink": {
"documentUuid": "16AB7575-D6D0-E2AC-34C6-32F79DF7CACE"
}
}

API Endpoints

List Annotations

GET /api/assets/{id}/versions/{versionId}/annotations-data?offset=0&limit=20

Returns a paged list of annotations on the specified document. Replies are not included.

Create Annotation

POST /api/assets/{id}/versions/{versionId}/annotations-data

Create a new annotation. See examples

Delete Annotation

DELETE /api/assets/{id}/versions/{versionId}/annotations-data/{annotationId}

Deletes an annotation by ID

Response Examples

Successful responses include full annotation details. Example response from creating a rectangle annotation:

{
"annotationId": 242,
"authorId": 57,
"associatedNumber": 3,
"createdDate": "2025-05-13T04:07:12.273",
"modifiedDate": "2025-05-13T04:07:12.273",
"type": "rectangle",
"page": 3,
"geometry": {
"boundingBox": {
"left": 27.44,
"bottom": 220.16,
"right": 358.12,
"top": 456.98
}
},
"style": {
"color": "#C544CE",
"width": 4
},
"content": {
"comment": "This is the main text of the annotation",
"fixedLabel": "Created by API"
},
"referenceLink": {
"documentUuid": "25E4AF5A-6DB3-72DC-F5F1-E18F32627863"
},
"replyCount": 0
}

Validation & Limitations

  • The API does not check if the page number is valid for the document.
  • It does not verify if bounding box or quad values are within document bounds.
  • Sending the same payload multiple times may create duplicate annotations.
  • Editing annotations and creating replies is not yet supported.
  • Attachments are not supported.

Next Steps

  • Try out the new endpoints in your environment.
  • Use the simplified JSON contract to create annotations.
  • Watch for future enhancements, including replies, editing, and more annotation tools.