Metrics

Retrieve one article's performance

How one article did on both sides at once: what the email did, and what the community did with it afterwards. No email provider can return the right hand column, because the reading, highlighting and arguing happened on Commune.

email is present only for an article Commune sent itself. For an article imported from an outside provider it is null, because that provider mailed it and never handed Commune the per recipient outcome. It is null for an article that has not been sent yet as well.

community is computed at read time and keeps counting long after the send, so two reads a week apart legitimately disagree.

Needs insights: read. The public tallies on an article, likes, comments and highlights, live on the article itself and need only content: read.

Which articles a key can measure depends on whether it acts for the newsletter, which a key does when it holds write in any family. Such a key can measure any of the newsletter's articles, including a draft or one scheduled for later. A key that holds only read permissions can measure exactly the articles getArticle would return to it: sent, already published and not restricted to a tag. Any other article answers 404, the same answer as an id that does not exist, so this operation never confirms that an unpublished article exists. For an article both kinds of key can read, the numbers are the same.

get/articles/{article}/stats

Request

  • Base URL: https://api.usecommune.com
  • URL: https://api.usecommune.com/articles/{article}/stats
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://usecommune.com/api/oauth/authorize, token URL https://usecommune.com/api/oauth/token, scopes: insights:read)

Query parameters

expandstring

Comma-separated list of relationship paths to inline in the response. Unexpanded relationships are returned as a reference object carrying only id and object. Each operation documents the paths it accepts, and an unknown path answers 400. Nested paths use a dot, for example article.newsletter.

fieldsstring

Comma-separated allow-list of top level properties to return on each object, so a client can trim a response it does not need in full. id and object are always returned. An unknown property name answers 400. Properties omitted by an operation, such as content on any article list, cannot be brought back with fields.

Response

The article's email and community performance.

object'article_stats' required

Always article_stats.

Example response

{
  "article": {
    "object": "newsletter",
    "id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.