Skip to Content
APIWebhooks

Webhooks

MarkUp.io uses webhooks to notify external applications when events happen. For example you could notify a task management app when someone leaves a new comment in a Markup. The events available are:

EventEvent Type
Comment Createdcomment_created
Comment Updatedcomment_updated
Comment Resolvedcomment_resolved
Comment Unresolvedcomment_unresolved
Comment Reply Createdcomment_reply_created
Markup Createdmarkup_created
Markup Status Changedmarkup_status_changed
Set Project Read Onlyset_project_read_only
Project Review Createdproject_review_created

Event reference

EventWhen it firesPayload
Comment CreatedA new comment is added to a Markupdata.markup, data.user, data.comment
Comment UpdatedA comment’s initial message is edited (text or attachments) or its screenshot finishes processingdata.markup, data.user, data.comment
Comment ResolvedA comment is marked resolveddata.markup, data.user, data.comment
Comment UnresolvedA comment is reopened (unresolved)data.markup, data.user, data.comment
Comment Reply CreatedA reply is added to a comment threaddata.markup, data.user, data.comment, data.message
Markup CreatedA new Markup is createddata.markup, data.user
Markup Status ChangedA Markup’s status changes (e.g. open for review, approved)data.markup, data.user
Set Project Read OnlyA Markup is set to read-onlydata.markup, data.user
Project Review CreatedA project review is createddata.markup, data.user, optional data.comment (string)

Notification events

MarkUp Created

Triggered when a new Markup is created.

Example

Example - Comment resolved
{ "webhookUrl": "https://example.com/webhook", "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "type": "markup_created", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "createdAt": "2023-02-15T20:41:54.137Z", "data": { "markup": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "thumbnailUrl": "https://images.markup.io/green/project-images/9dfee13a-42ef-4396-b564-e865e835e33f", "name": "markup.io", "webpageUrl": "https://markup.io", "commentingUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "lastActivityAt": "2023-02-15T20:41:54.137Z", "parentFolderId": "6a6360e6-fb79-416a-b765-6667f380b98e" }, "user": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]" } } } }

Parameters

OptionType
id string
webhookUrl string
type 'markup_created'
workspaceId string
data.markup
data.user

Comment Created

Triggered when a comment is created within a Markup.

Example

Example - Comment resolved
{ "webhookUrl": "https://example.com/webhook", "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "type": "comment_created", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "createdAt": "2023-02-15T20:41:54.137Z", "data": { "markup": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "thumbnailUrl": "https://images.markup.io/green/project-images/9dfee13a-42ef-4396-b564-e865e835e33f", "name": "markup.io", "webpageUrl": "https://markup.io", "commentingUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "lastActivityAt": "2023-02-15T20:41:54.137Z", "parentFolderId": "6a6360e6-fb79-416a-b765-6667f380b98e" }, "user": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]" }, "comment": { "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:26.830Z", "id": "dca005c2-0c69-4166-aae1-27ec76db94ef", "firstMessage": { "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:26.830Z", "id": "71734093-b557-46cf-8678-a028fbe6a8c8", "text": "Could you change the color of the button to red?", "attachments": [] }, "resolved": true, "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191/#thread/dca005c2-0c69-4166-aae1-27ec76db94ef", "messageCount": 1, "threadNumber": 7, "type": "webpage", "author": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]", "guest": false }, "priority": { "name": "High", "level": 2, "color": "#ff5252" }, "location": { "type": "webpage", "canonicalUrl": "https://markup.io", "originalUrl": "https://markup.io", "viewportXPercentage": 42.5, "viewportYPercentage": 18.0 } } } } }

Comment Updated

Triggered when an existing comment changes. This fires when the comment’s initial message is edited (its text and/or attachments), and when an asynchronously-rendered screenshot finishes processing and is attached to the comment (e.g. webpage screenshots produced after the comment was created). The payload mirrors comment_created; use it to refresh your stored copy of the comment, including the screenshot once it becomes available.

Example

Example - Comment updated (screenshot ready)
{ "webhookUrl": "https://example.com/webhook", "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "type": "comment_updated", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "createdAt": "2023-02-15T20:42:10.512Z", "data": { "markup": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:42:10.512Z", "thumbnailUrl": "https://images.markup.io/green/project-images/9dfee13a-42ef-4396-b564-e865e835e33f", "name": "markup.io", "webpageUrl": "https://markup.io", "commentingUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "lastActivityAt": "2023-02-15T20:42:10.512Z", "parentFolderId": "6a6360e6-fb79-416a-b765-6667f380b98e" }, "user": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]" }, "comment": { "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:30.512Z", "id": "dca005c2-0c69-4166-aae1-27ec76db94ef", "firstMessage": { "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:26.830Z", "id": "71734093-b557-46cf-8678-a028fbe6a8c8", "text": "Could you change the color of the button to red?", "attachments": [] }, "resolved": false, "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191/#thread/dca005c2-0c69-4166-aae1-27ec76db94ef", "messageCount": 1, "threadNumber": 7, "type": "image", "author": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]", "guest": false }, "location": { "type": "image", "projectImageId": "8c1e2d3f-1234-4abc-9d2e-2b6f0a3c5e7d", "offsetXPercentage": 33.0, "offsetYPercentage": 47.5 }, "screenshot": { "id": "0d6c1f6a-2c0a-4d0a-9d2e-2b6f0a3c5e7d", "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:30.512Z", "url": "https://images.markup.io/green/screenshots/0d6c1f6a-2c0a-4d0a-9d2e-2b6f0a3c5e7d", "type": "native", "etag": "\"9a0364b9e99bb480dd25e1f0284c8555\"", "width": 1280, "height": 720, "filesize": 245678, "mimeType": "image/png" } } } }

Comment Resolved

Triggered when a comment is resolved within a Markup.

Example

Example - Comment resolved
{ "webhookUrl": "https://example.com/webhook", "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "type": "comment_resolved", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "createdAt": "2023-02-15T20:41:54.137Z", "data": { "markup": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "thumbnailUrl": "https://images.markup.io/green/project-images/9dfee13a-42ef-4396-b564-e865e835e33f", "name": "markup.io", "webpageUrl": "https://markup.io", "commentingUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "lastActivityAt": "2023-02-15T20:41:54.137Z", "parentFolderId": "6a6360e6-fb79-416a-b765-6667f380b98e" }, "user": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]" }, "comment": { "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:26.830Z", "id": "dca005c2-0c69-4166-aae1-27ec76db94ef", "firstMessage": { "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:26.830Z", "id": "71734093-b557-46cf-8678-a028fbe6a8c8", "text": "Could you change the color of the button to red?", "attachments": [] }, "resolved": true, "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191/#thread/dca005c2-0c69-4166-aae1-27ec76db94ef", "messageCount": 1, "threadNumber": 7, "type": "pdf", "author": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]", "guest": false }, "location": { "type": "pdf", "pageNumber": 3, "offsetXPercentage": 50.0, "offsetYPercentage": 22.5 } } } } }

Parameters

OptionType
id string
webhookUrl string
type 'comment_resolved'
workspaceId string
data.markup
data.user
data.comment

Comment Unresolved

Triggered when a comment is unresolved within a Markup.

Example

Example content - Comment resolved
{ "webhookUrl": "https://example.com/webhook", "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "type": "comment_unresolved", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "createdAt": "2023-02-15T20:41:54.137Z", "data": { "markup": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "thumbnailUrl": "https://images.markup.io/green/project-images/9dfee13a-42ef-4396-b564-e865e835e33f", "name": "markup.io", "webpageUrl": "https://markup.io", "commentingUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "lastActivityAt": "2023-02-15T20:41:54.137Z", "parentFolderId": "6a6360e6-fb79-416a-b765-6667f380b98e" }, "user": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]" }, "comment": { "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:26.830Z", "id": "dca005c2-0c69-4166-aae1-27ec76db94ef", "firstMessage": { "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:26.830Z", "id": "71734093-b557-46cf-8678-a028fbe6a8c8", "text": "Could you change the color of the button to red?", "attachments": [] }, "resolved": false, "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191/#thread/dca005c2-0c69-4166-aae1-27ec76db94ef", "messageCount": 1, "threadNumber": 7, "type": "webpage", "author": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]", "guest": false }, "location": { "type": "webpage", "canonicalUrl": "https://markup.io", "originalUrl": "https://markup.io", "viewportXPercentage": 42.5, "viewportYPercentage": 18.0 } } } } }

Parameters

OptionType
id string
webhookUrl string
type 'comment_unresolved'
workspaceId string
data.markup
data.user
data.comment

Comment Reply Created

Triggered when a reply is created within a comment.

Example

Example content - Reply resolved
{ "webhookUrl": "https://example.com/webhook", "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "type": "comment_reply_created", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "createdAt": "2023-02-15T20:41:54.137Z", "data": { "message" : { "message": { "createdAt": "2023-02-16T10:11:15.711Z", "modifiedAt": "2023-02-16T10:11:15.711Z", "id": "4fefda85-192f-43cf-8d4b-e909c8e475d5", "text": "Yes of course!", "attachments": [] } }, "markup": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "thumbnailUrl": "https://images.markup.io/green/project-images/9dfee13a-42ef-4396-b564-e865e835e33f", "name": "markup.io", "webpageUrl": "https://markup.io", "commentingUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "lastActivityAt": "2023-02-15T20:41:54.137Z", "parentFolderId": "6a6360e6-fb79-416a-b765-6667f380b98e" }, "user": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]" }, "comment": { "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:26.830Z", "id": "dca005c2-0c69-4166-aae1-27ec76db94ef", "firstMessage": { "createdAt": "2023-02-16T10:01:26.830Z", "modifiedAt": "2023-02-16T10:01:26.830Z", "id": "71734093-b557-46cf-8678-a028fbe6a8c8", "text": "Could you change the color of the button to red?", "attachments": [] }, "resolved": false, "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191/#thread/dca005c2-0c69-4166-aae1-27ec76db94ef", "messageCount": 2, "threadNumber": 7, "type": "image", "author": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]", "guest": false }, "location": { "type": "image", "projectImageId": "8c1e2d3f-1234-4abc-9d2e-2b6f0a3c5e7d", "offsetXPercentage": 33.0, "offsetYPercentage": 47.5, "startTime": 12.5, "endTime": 18.0 } } } } }

Parameters

OptionType
id string
webhookUrl string
type 'comment_reply_created'
workspaceId string
data.markup
data.user
data.comment

Markup Status Changed

Triggered when a Markup’s status changes (e.g. open for review, approved).

Example

Example - Markup status changed
{ "webhookUrl": "https://example.com/webhook", "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "type": "markup_status_changed", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "createdAt": "2023-02-15T20:41:54.137Z", "data": { "markup": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "thumbnailUrl": "https://images.markup.io/green/project-images/9dfee13a-42ef-4396-b564-e865e835e33f", "name": "markup.io", "webpageUrl": "https://markup.io", "commentingUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "lastActivityAt": "2023-02-15T20:41:54.137Z", "parentFolderId": "6a6360e6-fb79-416a-b765-6667f380b98e" }, "user": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]" } } }

Parameters

OptionType
id string
webhookUrl string
type 'markup_status_changed'
workspaceId string
data.markup
data.user

Set Project Read Only

Triggered when a Markup is set to read-only.

Example

Example - Set project read only
{ "webhookUrl": "https://example.com/webhook", "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "type": "set_project_read_only", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "createdAt": "2023-02-15T20:41:54.137Z", "data": { "markup": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "thumbnailUrl": "https://images.markup.io/green/project-images/9dfee13a-42ef-4396-b564-e865e835e33f", "name": "markup.io", "webpageUrl": "https://markup.io", "commentingUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "lastActivityAt": "2023-02-15T20:41:54.137Z", "parentFolderId": "6a6360e6-fb79-416a-b765-6667f380b98e" }, "user": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]" } } }

Parameters

OptionType
id string
webhookUrl string
type 'set_project_read_only'
workspaceId string
data.markup
data.user

Project Review Created

Triggered when a project review is created.

Example

Example - Project review created
{ "webhookUrl": "https://example.com/webhook", "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "type": "project_review_created", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "createdAt": "2023-02-15T20:41:54.137Z", "data": { "markup": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "thumbnailUrl": "https://images.markup.io/green/project-images/9dfee13a-42ef-4396-b564-e865e835e33f", "name": "markup.io", "webpageUrl": "https://markup.io", "commentingUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "appUrl": "https://app.markup.io/markup/ce10f176-6a68-42eb-9ce2-718aae4ba191", "workspaceId": "355fe681-10d5-489e-8964-41b812d1d0fe", "lastActivityAt": "2023-02-15T20:41:54.137Z", "parentFolderId": "6a6360e6-fb79-416a-b765-6667f380b98e" }, "user": { "id": "ce10f176-6a68-42eb-9ce2-718aae4ba191", "createdAt": "2023-02-15T20:41:54.137Z", "modifiedAt": "2023-02-15T20:41:54.137Z", "name": "John Doe", "email": "[email protected]" }, "comment": "Please review the latest changes." } }

Parameters

OptionType
id string
webhookUrl string
type 'project_review_created'
workspaceId string
data.markup
data.user
data.comment optionalstring

MarkupNotification

OptionType
id string
createdAt Iso8601Timestamp
modifiedAt Iso8601Timestamp
deletedAt optionalIso8601Timestamp
webpageUrl optionalstring
name string
thumbnailUrl string
appUrl string
workspaceId string
parentFolderId string
commentingUrl string

UserNotification

OptionType
id string
createdAt Iso8601Timestamp
modifiedAt Iso8601Timestamp
deletedAt optionalIso8601Timestamp
name string
email optionalstring
guest boolean
avatarUrl optionalstring

CommentNotification

OptionType
id string
createdAt Iso8601Timestamp
modifiedAt Iso8601Timestamp
deletedAt optionalIso8601Timestamp
resolved boolean
firstMessage
appUrl string
messageCount number
screenshot optional
threadNumber number
type
author optional
priority optional
location

MessageNotification

OptionType
id string
createdAt Iso8601Timestamp
modifiedAt Iso8601Timestamp
deletedAt optionalIso8601Timestamp
text string
attachments optional
screenshot optional

MessageScreenshotNotification

OptionType
id string
createdAt Iso8601Timestamp
modifiedAt Iso8601Timestamp
deletedAt optionalIso8601Timestamp
url string
etag string
mimeType string
width number
height number
filesize number
type `extension`|`native`

MessageAttachmentNotification

OptionType
id string
createdAt Iso8601Timestamp
modifiedAt Iso8601Timestamp
deletedAt optionalIso8601Timestamp
url string
etag string
mimeType string
originalFilename string
filesize number

CommentType

A string discriminator describing what kind of resource the comment is anchored to. Tells you which ThreadLocationNotification variant to expect in comment.location.

ValueDescription
webpageComment is anchored on a webpage Markup
imageComment is anchored on an image (or video) Markup
pdfComment is anchored on a PDF Markup

PriorityNotification

Present on comment.priority only when the comment has been prioritized.

OptionType
name string
level number
color optionalstring

ThreadLocationNotification

Discriminated union describing where in the Markup the comment is pinned. Use comment.type (or the embedded type discriminator) to narrow the variant.

ThreadLocationNotification = | WebpageLocationNotification | ImageLocationNotification | PdfLocationNotification

WebpageLocationNotification

Present when comment.type === "webpage". viewportXPercentage / viewportYPercentage describe where the comment was placed relative to the viewport at the time it was created; both are null for comments that aren’t tied to a specific viewport coordinate.

OptionType
type 'webpage'
canonicalUrl string
originalUrl string
viewportXPercentage optionalnumber
viewportYPercentage optionalnumber

ImageLocationNotification

Present when comment.type === "image". offsetXPercentage / offsetYPercentage are the comment pin’s position on the image expressed as a percentage of the image’s width / height. startTime / endTime are populated only for video Markups and mark the time range (in seconds) the comment applies to.

OptionType
type 'image'
projectImageId string
offsetXPercentage number
offsetYPercentage number
startTime optionalnumber
endTime optionalnumber

PdfLocationNotification

Present when comment.type === "pdf". pageNumber is 1-indexed. offsetXPercentage / offsetYPercentage are the comment pin’s position on the page expressed as a percentage of the page’s width / height.

OptionType
type 'pdf'
pageNumber number
offsetXPercentage number
offsetYPercentage number