Skip to main content
POST
/
:projectId
/
comments
Create Comment
curl --request POST \
  --url https://api.replyke.com/api/v6/:projectId/comments \
  --header 'Content-Type: application/json' \
  --data '{
  "entityId": "<string>",
  "content": "<string>",
  "gif": {
    "altText": "<string>",
    "gifPreviewUrl": "<string>",
    "gifUrl": "<string>",
    "id": "<string>",
    "url": "<string>",
    "aspectRatio": "<string>"
  },
  "mentions": [
    {}
  ],
  "parentId": "<string>",
  "referencedCommentId": "<string>",
  "foreignId": "<string>",
  "attachments": [
    {}
  ],
  "metadata": {},
  "userId": "<string>"
}'
{
  "id": "<string>",
  "entityId": "<string>",
  "userId": "<string>",
  "content": "<string>",
  "mentions": [
    {}
  ],
  "gif": {},
  "attachments": [
    {}
  ],
  "metadata": {},
  "createdAt": "<string>",
  "updatedAt": "<string>"
}
Creates a new comment or reply on a specific entity. Comments can include text, a GIF, mentions, attachments, and metadata. Only authenticated users (or master clients) may create comments.

Body Parameters

entityId
string
required
ID of the entity to attach the comment to
content
string
Text content of the comment. Required unless gif is provided.
gif
object
mentions
array
List of mentioned users with { id: string, username: string } format
parentId
string
ID of the parent comment (for replies)
referencedCommentId
string
ID of a referenced (quoted) comment
foreignId
string
Optional external reference ID
attachments
array
List of attached files or resources
metadata
object
Custom metadata for this comment
userId
string
Allowed only for master clients. Posts the comment on behalf of a user.

Response

id
string
Unique comment identifier
entityId
string
ID of the entity this comment belongs to
userId
string
ID of the user who created the comment
content
string
Comment content
mentions
array
List of mentioned users
gif
object
GIF object if included
attachments
array
Attached files or resources
metadata
object
Custom metadata
createdAt
string
Creation timestamp in ISO 8601 format
updatedAt
string
Last update timestamp in ISO 8601 format

Error Responses

{
  "error": "Missing entity ID",
  "code": "comment/missing-entity-id"
}
{
  "error": "Missing required comment content",
  "code": "comment/missing-content"
}
{
  "error": "Missing user ID",
  "code": "comment/missing-user-id"
}
{
  "error": "Entity not found",
  "code": "comment/entity-not-found"
}
{
  "error": "Internal server error",
  "code": "comment/server-error",
  "details": "[error message]"
}

Notes

  • Either content or gif must be present.
  • If userId is provided, the request must come from a master client.
  • Reputation is awarded to the user who posts the comment.
  • Notifications are triggered automatically:
    • To the entity author
    • To the parent comment author (for replies)
    • To each mentioned user (excluding duplicates)
  • API usage for comments is tracked via Redis.
I