Skip to main content

Annotation Request Examples

Example request bodies for creating each annotation type with the Annotations API. Replace the IDs, GUIDs, and coordinates with values from your own documents.

Every request needs a bearer token for a user with the Integration API – Access or System Administration – Access right. Send JSON requests with Content-Type: application/json.

For field requirements, validation rules, and response details, see the Annotations API reference.

Unless noted, the examples use the workflow route:

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

The same bodies work on the collection and review-findings routes.


Shape Annotations​

Rectangle​

{
"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"
}
}

Callout​

{
"type": "callout",
"page": 1,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 120.5,
"bottom": 540.25,
"right": 330.75,
"top": 610.0
}
},
"style": {
"color": "#D9381E",
"width": 2
},
"content": {
"comment": "Update this headline before launch"
}
}

Sticky Note​

{
"type": "stickynote",
"page": 0,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 40.0,
"bottom": 700.0,
"right": 60.0,
"top": 720.0
}
},
"style": {
"color": "#FFC400",
"width": 1
},
"content": {
"comment": "Confirm the final image with the brand team"
}
}

Free Text​

content.comment is the text placed on the page. style.width is optional for free text.

{
"type": "freetext",
"page": 2,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 72.0,
"bottom": 120.0,
"right": 300.0,
"top": 160.0
}
},
"style": {
"color": "#1F4E79"
},
"content": {
"comment": "Legal approved this version on March 3"
}
}

Freehand Annotations​

Freehand types use geometry.inkList, an array of strokes. Each stroke is an array of at least two points.

Freehand​

{
"type": "freehand",
"page": 4,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 100.0,
"bottom": 300.0,
"right": 260.0,
"top": 380.0
},
"inkList": [
[
{ "x": 100.0, "y": 300.0 },
{ "x": 150.5, "y": 345.2 },
{ "x": 210.0, "y": 360.8 },
{ "x": 260.0, "y": 380.0 }
]
]
},
"style": {
"color": "#00B2A9",
"width": 3
},
"content": {
"comment": "Circle this logo placement"
}
}

Freehand and Highlight​

style.opacity is optional and must be between 0.0 and 1.0.

{
"type": "freehandandhighlight",
"page": 4,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 90.0,
"bottom": 410.0,
"right": 320.0,
"top": 450.0
},
"inkList": [
[
{ "x": 90.0, "y": 430.0 },
{ "x": 200.0, "y": 432.5 },
{ "x": 320.0, "y": 428.0 }
]
]
},
"style": {
"color": "#FFEB3B",
"width": 12,
"opacity": 0.5
}
}

Text Markup Annotations​

Text markup types use geometry.quads, one quad per text segment. Coordinates must be non-zero.

Highlight​

{
"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"
}
}

Strikeout​

{
"type": "strikeout",
"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": "#D9381E"
},
"content": {
"comment": "Remove this claim",
"quotedText": "Clinically proven results in 7 days"
}
}

Underline​

{
"type": "underline",
"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": "#1F4E79"
},
"content": {
"comment": "Needs a citation",
"quotedText": "Ranked number one by industry analysts"
}
}

Squiggly​

{
"type": "squiggly",
"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": "#F57C00",
"width": 2
},
"content": {
"comment": "Check spelling",
"quotedText": "recieve your free sample"
}
}

Mark Insert Text​

geometry.quads is optional for insert text.

{
"type": "markinserttext",
"page": 5,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 210.0,
"bottom": 500.0,
"right": 222.0,
"top": 514.0
}
},
"style": {
"color": "#2E7D32",
"width": 2
},
"content": {
"comment": "Insert \"limited-time\" before \"offer\""
}
}

Mark Replace Text​

{
"type": "markreplacetext",
"page": 5,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 67.876,
"bottom": 560.0,
"right": 250.0,
"top": 580.0
},
"quads": [
{
"x1": 67.87, "y1": 580.0,
"x2": 250.0, "y2": 580.0,
"x3": 67.87, "y3": 560.0,
"x4": 250.0, "y4": 560.0
}
]
},
"style": {
"color": "#C62828",
"width": 2
},
"content": {
"comment": "Replace with \"spring collection\"",
"quotedText": "winter collection"
}
}

File Attachment​

A fileattachment annotation is sent as multipart/form-data, with the annotation as JSON in the annotation part and the file in the file part. The file cannot exceed 5 MB. style.color is optional.

curl -X POST "https://{domain}.aprimo.com/api/assets/{id}/versions/{versionId}/annotations-data" \
-H "Authorization: Bearer $TOKEN" \
-F 'annotation={
"type": "fileattachment",
"page": 0,
"authorId": 57,
"geometry": {
"boundingBox": { "left": 500.0, "bottom": 700.0, "right": 520.0, "top": 720.0 }
},
"content": { "comment": "Reference spec sheet" }
};type=application/json' \
-F "file=@spec-sheet.pdf"

If fileName is omitted from the annotation, the uploaded file's name is used.


Any annotation type can include reference links. These examples show only the referenceLink and referenceLinks properties. Add them to any of the bodies above.

"referenceLink": {
"documentUuid": "25E4AF5A-6DB3-72DC-F5F1-E18F32627863"
}
"referenceLinks": [
{
"documentUuid": "25E4AF5A-6DB3-72DC-F5F1-E18F32627863",
"tagId": 1042
}
]

Sending more than one link requires the multiple references feature to be enabled for your tenant.

"referenceLinks": [
{
"documentUuid": "25E4AF5A-6DB3-72DC-F5F1-E18F32627863",
"tagId": 1042
},
{
"documentUuid": "16AB7575-D6D0-E2AC-34C6-32F79DF7CACE"
}
]

Other Contexts​

The request body is the same in every context. Only the route changes.

Collaborative Collection​

POST /api/collections/{collectionGuid}/records/{recordGuid}/versions/{versionGuid}/annotations
{
"type": "rectangle",
"page": 0,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 27.44,
"bottom": 220.16,
"right": 358.12,
"top": 456.98
}
},
"style": {
"color": "#C544CE",
"width": 4
},
"content": {
"comment": "Feedback from the collection review"
}
}

Assets with Review Findings​

POST /api/records/{recordGuid}/versions/{versionGuid}/review-findings-annotations
{
"type": "rectangle",
"page": 0,
"authorId": 57,
"geometry": {
"boundingBox": {
"left": 27.44,
"bottom": 220.16,
"right": 358.12,
"top": 456.98
}
},
"style": {
"color": "#D9381E",
"width": 4
},
"content": {
"comment": "Follow up on this finding"
}
}