Messages

Retrieve a message

Read one reply. A message inherits the visibility of the thread it sits in, so this answers 404 whenever the thread would.

get/messages/{message}

Request

  • Base URL: https://api.usecommune.com
  • URL: https://api.usecommune.com/messages/{message}
  • 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: content: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 message.

object'message' required

Always message.

idstring uuid required

Stable identifier.

short_idstring nullable

Eight character base62 identifier used by the message's permalink. Null for a message old enough that none was assigned.

depthinteger required

1 for a reply to the thread, 2 for a reply to a reply. Commune does not nest deeper, so a client can render the tree with a fixed two level layout.

contentstring required

The message body as HTML. Treat it as untrusted markup and render it in a sandboxed context.

created_atstring date-time required

When the reply was written.

updated_atstring date-time

When the row last changed for any reason.

edited_atstring date-time nullable

When the author last edited the text or attachments. Not touched by reactions or other side effects, so it is a faithful edited marker.

Example response

{
  "thread": {
    "object": "newsletter",
    "id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
  },
  "newsletter": {
    "object": "newsletter",
    "id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
  },
  "author": {
    "object": "newsletter",
    "id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
  },
  "parent": {
    "object": "newsletter",
    "id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
  },
  "quoted": {
    "object": "newsletter",
    "id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
  },
  "highlight": {
    "object": "newsletter",
    "id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
  },
  "reactions": [
    {
      "emoji": "🎉",
      "users": [
        {
          "object": "newsletter",
          "id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
        }
      ]
    }
  ]
}

Changes

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