Skip to navigation

Get a metric

Calculates a metric over the project’s responses. Without from and to, it covers the last 30 days.

Authentication

AuthorizationBearer

Your Chattermill API key, from Settings > API in the Chattermill app.

Path parameters

projectstringRequired

Your project’s key, from List projects.

Query parameters

typestringRequired

Metric to calculate: nps, csat, average_score, net_sentiment or volume.

fromstringOptional

Start date, as YYYY-MM-DD.

tostringOptional

End date, as YYYY-MM-DD.

custom_segmentintegerOptional
Calculate the metric only for responses in this custom segment, by ID.
categorystringOptional

Name of the category that theme belongs to. Use it when two categories have a theme with the same name.

themestringOptional
Calculate the metric only for responses that mention the theme with this name. If no theme has this name, the filter is ignored.
sentimentintegerOptional

Use with theme to count only mentions with this sentiment, -1, 0 or 1.

Response

Metrics collection
metricslist of objectsOptional

Errors

401
Unauthorized Error