Comment Object Documentation

The Comment object represents a user-generated comment within Replyke. It supports rich content including mentions, threaded replies, GIFs, attachments and more.

Properties

PropertyTypeDescription
idstringUnique identifier for the comment (UUID).
projectIdstringIdentifier for the associated project (UUID).
foreignIdstring | nullOptional identifier from an external system; format is not guaranteed to be UUID.
entityIdstringIdentifier for the related entity (UUID).
entityEntity?Optional entity object (if included in query).
userIdstringIdentifier of the comment’s author (UUID).
userUserLeanLightweight user object (e.g., ID, username, avatar).
parentIdstring | nullIf this is a reply, this holds the parent comment ID (UUID).
contentstring | nullMain text content of the comment. Can be null when only media is provided.
gifGifData | nullOptional GIF media attachment.
mentionsMention[]List of users mentioned in the comment.
upvotesstring[]List of user IDs (UUIDs) who upvoted the comment.
downvotesstring[]List of user IDs (UUIDs) who downvoted the comment.
repliesCountnumberNumber of direct replies to this comment.
createdAtDateTimestamp when the comment was created.
updatedAtDateTimestamp when the comment was last updated.
deletedAtDate | nullTimestamp when the comment was deleted, if applicable.
parentDeletedAtDate | nullIf this is a reply, the timestamp of the parent comment’s deletion, if applicable.

Supporting Types

GifData

PropertyTypeDescription
idstringUnique identifier for the GIF (UUID).
urlstringGeneral-purpose link to the GIF resource.
gifUrlstringURL to the full-sized GIF.
gifPreviewUrlstringURL to a lower-resolution preview version of the GIF.
altTextstring?Optional alt text for screen readers or accessibility.
aspectRationumberWidth-to-height ratio (e.g., 1.78 for 16:9).

Mention

PropertyTypeDescription
idstringID of the mentioned user (UUID).
usernamestringUsername of the mentioned user.

Example

Comment with Text and Mention

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "projectId": "project-xyz",
  "foreignId": null,
  "entityId": "entity-123",
  "userId": "user-789",
  "parentId": null,
  "content": "This is a great post!",
  "gif": null,
  "mentions": [{ "id": "user-555", "username": "johndoe" }],
  "upvotes": ["user-100", "user-101"],
  "downvotes": [],
  "repliesCount": 3,
  "createdAt": "2024-02-14T12:34:56Z",
  "updatedAt": "2024-02-14T12:34:56Z",
  "deletedAt": null,
  "parentDeletedAt": null
}

Comment with GIF Only

{
  "id": "456e7890-e89b-12d3-a456-426614174999",
  "projectId": "project-abc",
  "foreignId": "external-456",
  "entityId": "entity-789",
  "userId": "user-222",
  "parentId": null,
  "content": null,
  "gif": {
    "id": "gif-999",
    "url": "https://example.com/gif",
    "gifUrl": "https://example.com/full.gif",
    "gifPreviewUrl": "https://example.com/preview.gif",
    "altText": "Funny dancing cat",
    "aspectRatio": 1.33
  },
  "mentions": [],
  "upvotes": ["user-555"],
  "downvotes": [],
  "repliesCount": 0,
  "createdAt": "2024-02-14T13:45:00Z",
  "updatedAt": "2024-02-14T13:45:00Z",
  "deletedAt": null,
  "parentDeletedAt": null
}