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>"
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/comments"
payload = {
"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>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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>'
})
};
fetch('https://api.replyke.com/api/v6/:projectId/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/comments"
payload := strings.NewReader("{\n \"entityId\": \"<string>\",\n \"content\": \"<string>\",\n \"gif\": {\n \"altText\": \"<string>\",\n \"gifPreviewUrl\": \"<string>\",\n \"gifUrl\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"aspectRatio\": \"<string>\"\n },\n \"mentions\": [\n {}\n ],\n \"parentId\": \"<string>\",\n \"referencedCommentId\": \"<string>\",\n \"foreignId\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"metadata\": {},\n \"userId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.replyke.com/api/v6/:projectId/comments")
.header("Content-Type", "application/json")
.body("{\n \"entityId\": \"<string>\",\n \"content\": \"<string>\",\n \"gif\": {\n \"altText\": \"<string>\",\n \"gifPreviewUrl\": \"<string>\",\n \"gifUrl\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"aspectRatio\": \"<string>\"\n },\n \"mentions\": [\n {}\n ],\n \"parentId\": \"<string>\",\n \"referencedCommentId\": \"<string>\",\n \"foreignId\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"metadata\": {},\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityId\": \"<string>\",\n \"content\": \"<string>\",\n \"gif\": {\n \"altText\": \"<string>\",\n \"gifPreviewUrl\": \"<string>\",\n \"gifUrl\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"aspectRatio\": \"<string>\"\n },\n \"mentions\": [\n {}\n ],\n \"parentId\": \"<string>\",\n \"referencedCommentId\": \"<string>\",\n \"foreignId\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"metadata\": {},\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"entityId": "<string>",
"userId": "<string>",
"content": "<string>",
"mentions": [
{}
],
"gif": {},
"attachments": [
{}
],
"metadata": {},
"createdAt": "<string>",
"updatedAt": "<string>"
}Comment Endpoints
Create Comment
Create a new comment or reply on an entity
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>"
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/comments"
payload = {
"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>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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>'
})
};
fetch('https://api.replyke.com/api/v6/:projectId/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/comments"
payload := strings.NewReader("{\n \"entityId\": \"<string>\",\n \"content\": \"<string>\",\n \"gif\": {\n \"altText\": \"<string>\",\n \"gifPreviewUrl\": \"<string>\",\n \"gifUrl\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"aspectRatio\": \"<string>\"\n },\n \"mentions\": [\n {}\n ],\n \"parentId\": \"<string>\",\n \"referencedCommentId\": \"<string>\",\n \"foreignId\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"metadata\": {},\n \"userId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.replyke.com/api/v6/:projectId/comments")
.header("Content-Type", "application/json")
.body("{\n \"entityId\": \"<string>\",\n \"content\": \"<string>\",\n \"gif\": {\n \"altText\": \"<string>\",\n \"gifPreviewUrl\": \"<string>\",\n \"gifUrl\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"aspectRatio\": \"<string>\"\n },\n \"mentions\": [\n {}\n ],\n \"parentId\": \"<string>\",\n \"referencedCommentId\": \"<string>\",\n \"foreignId\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"metadata\": {},\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityId\": \"<string>\",\n \"content\": \"<string>\",\n \"gif\": {\n \"altText\": \"<string>\",\n \"gifPreviewUrl\": \"<string>\",\n \"gifUrl\": \"<string>\",\n \"id\": \"<string>\",\n \"url\": \"<string>\",\n \"aspectRatio\": \"<string>\"\n },\n \"mentions\": [\n {}\n ],\n \"parentId\": \"<string>\",\n \"referencedCommentId\": \"<string>\",\n \"foreignId\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"metadata\": {},\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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
ID of the entity to attach the comment to
Text content of the comment. Required unless
gif is provided.List of mentioned users with
{ id: string, username: string } formatID of the parent comment (for replies)
ID of a referenced (quoted) comment
Optional external reference ID
List of attached files or resources
Custom metadata for this comment
Allowed only for master clients. Posts the comment on behalf of a user.
Response
Unique comment identifier
ID of the entity this comment belongs to
ID of the user who created the comment
Comment content
List of mentioned users
GIF object if included
Attached files or resources
Custom metadata
Creation timestamp in ISO 8601 format
Last update timestamp in ISO 8601 format
Error Responses
Missing Entity ID - 400 Bad Request
Missing Entity ID - 400 Bad Request
{
"error": "Missing entity ID",
"code": "comment/missing-entity-id"
}
Missing Content - 400 Bad Request
Missing Content - 400 Bad Request
{
"error": "Missing required comment content",
"code": "comment/missing-content"
}
Missing User ID - 400 Bad Request
Missing User ID - 400 Bad Request
{
"error": "Missing user ID",
"code": "comment/missing-user-id"
}
Entity Not Found - 404 Not Found
Entity Not Found - 404 Not Found
{
"error": "Entity not found",
"code": "comment/entity-not-found"
}
Server Error - 500 Internal Server Error
Server Error - 500 Internal Server Error
{
"error": "Internal server error",
"code": "comment/server-error",
"details": "[error message]"
}
Notes
- Either
contentorgifmust be present. - If
userIdis 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

