POST https://api.usecommune.comarticle.liked Production. There is no separate sandbox host.

Article like added or removed

A reader liked an article, or took the like back. data.direction says which: added when the like was given, removed when it was withdrawn.

One topic carries both directions, so subscribing once is enough to mirror the whole association. A consumer that heard a named person liked an article and never heard them take it back would keep acting on a claim the person withdrew.

data.reader names the person. The same actions are readable as engagement records at GET /newsletters/{newsletter}/events?event_type=like. A reader with no Commune account cannot like an article, so unlike article.read this field is null only for a deleted account.

data.like_count is the whole tally after the change, counted in the same transaction that made it, and is the number GET /articles/{article} reports on stats.likes. It is on the removal as well as the addition, so a consumer that stores it never has to add anything up and a consumer that missed a message is corrected by the next one.

Fires on a real row change only. Liking an article this person already liked is silent, and so is unliking one they had not liked. Liking, unliking and liking again fires three times.

Delivered as a single HTTPS POST to the consumer's registered endpoint, with the message as the JSON request body. Respond 2xx to acknowledge. Anything else, or a timeout, is retried with backoff, so acknowledge fast and do the work afterwards.

Request Headers

  • string Required
  • string(uuid) Required
  • string Required
  • string Required
  • string(date-time) Required
  • integer

Body

A reader liked an article, or took the like back.

  • string(uuid) Required
  • string Required
  • string Required
  • string(date-time) Required
  • string(uuid) | null Required
  • string | null Required
POST article.liked
Loading...

Share your request

Use this link to easily share a pre-filled request of this operation. Everything you filled will be shared apart from the authentication fields.

Request URL

https://api-reference.usecommune.dev/explorer/operation/operation-onarticleliked

Send a delete request

It looks like you’re about to send a DELETE request to this API. This type of request carries a risk of permanent and irreversible data loss.

Are you sure you want to continue?
Response
Waiting for a request to be sent.