Skip to Content
APIResourcesAdmin APIProduct Metrics (Public API)

Product Metrics (Public API)

User and project metrics for the API key’s workspace. Same data as v1 product-metrics; workspace is derived from the API key.

Get user metrics

GET /api/v2/product-metrics/user

Returns user metrics for the API key’s workspace in the given date range. Query: startDate, endDate (ISO 8601), optional offset, limit, sortBy, sortDirection.

GET /api/v2/product-metrics/user
curl "https://api.markup.io/api/v2/product-metrics/user?startDate=some+startDate&endDate=some+endDate" \ -X GET \ -H "Authorization: Bearer <API-KEY-SECRET>" \ -H "Markup-API-Version: 2023-02-22" \ -H "Content-Type: application/json"
200 OK
{ "data": { "rows": {}, "totalRows": 123 } }

Response Body UserMetricsResponse

OptionType
rows Array
totalRows number

Request Query Params MetricsQuery

OptionType
startDate string
endDate string
offset optionalnumber
limit optionalnumber
sortBy optionalstring

Get project metrics

GET /api/v2/product-metrics/project

Returns project metrics for the API key’s workspace in the given date range. Query: startDate, endDate (ISO 8601), optional offset, limit, sortBy, sortDirection.

GET /api/v2/product-metrics/project
curl "https://api.markup.io/api/v2/product-metrics/project?startDate=some+startDate&endDate=some+endDate" \ -X GET \ -H "Authorization: Bearer <API-KEY-SECRET>" \ -H "Markup-API-Version: 2023-02-22" \ -H "Content-Type: application/json"
200 OK
{ "data": { "rows": {}, "totalRows": 123 } }

Response Body ProjectMetricsResponse

OptionType
rows Array
totalRows number

Request Query Params MetricsQuery

OptionType
startDate string
endDate string
offset optionalnumber
limit optionalnumber
sortBy optionalstring

Get user metrics workspace totals

GET /api/v2/product-metrics/user/workspace-totals

Returns workspace-level user metrics totals for the date range. Query: startDate, endDate (ISO 8601).

GET /api/v2/product-metrics/user/workspace-totals
curl "https://api.markup.io/api/v2/product-metrics/user/workspace-totals?startDate=some+startDate&endDate=some+endDate" \ -X GET \ -H "Authorization: Bearer <API-KEY-SECRET>" \ -H "Markup-API-Version: 2023-02-22" \ -H "Content-Type: application/json"
200 OK
{ "data": { "workspaceId": "some workspaceId", "lastActivity": "some lastActivity", "activeUsers": 123, "projectsCreated": 123, "commentsCreated": 123, "threadsResolved": 123 } }

Response Body UserMetricsWorkspaceTotalsResponse

OptionType
workspaceId string
lastActivity string
activeUsers number
projectsCreated number
commentsCreated number
threadsResolved number

Request Query Params WorkspaceTotalsQuery

OptionType
startDate string
endDate string

Get project metrics workspace totals

GET /api/v2/product-metrics/project/workspace-totals

Returns workspace-level project metrics totals for the date range. Query: startDate, endDate (ISO 8601).

GET /api/v2/product-metrics/project/workspace-totals
curl "https://api.markup.io/api/v2/product-metrics/project/workspace-totals?startDate=some+startDate&endDate=some+endDate" \ -X GET \ -H "Authorization: Bearer <API-KEY-SECRET>" \ -H "Markup-API-Version: 2023-02-22" \ -H "Content-Type: application/json"
200 OK
{ "data": { "workspaceId": "some workspaceId", "lastActivity": "some lastActivity", "commentsCreated": 123, "threadsResolved": 123, "threadsUnresolved": 123 } }

Response Body ProjectMetricsWorkspaceTotalsResponse

OptionType
workspaceId string
lastActivity string
commentsCreated number
threadsResolved number
threadsUnresolved number

Request Query Params WorkspaceTotalsQuery

OptionType
startDate string
endDate string

Get last user metrics update

GET /api/v2/product-metrics/user/last-updated

Returns the timestamp of the last user metrics update for the workspace.

GET /api/v2/product-metrics/user/last-updated
curl "https://api.markup.io/api/v2/product-metrics/user/last-updated" \ -X GET \ -H "Authorization: Bearer <API-KEY-SECRET>" \ -H "Markup-API-Version: 2023-02-22" \ -H "Content-Type: application/json"
200 OK
{ "data": {} }

Response Body - WorkspaceLastUpdatedResponse

Get last project metrics update

GET /api/v2/product-metrics/project/last-updated

Returns the timestamp of the last project metrics update for the workspace.

GET /api/v2/product-metrics/project/last-updated
curl "https://api.markup.io/api/v2/product-metrics/project/last-updated" \ -X GET \ -H "Authorization: Bearer <API-KEY-SECRET>" \ -H "Markup-API-Version: 2023-02-22" \ -H "Content-Type: application/json"
200 OK
{ "data": {} }

Response Body - WorkspaceLastUpdatedResponse

WorkspaceLastUpdatedResponse

OptionType