Create Report
curl --request POST \
--url https://api.replyke.com/api/v6/:projectId/api/v7/reports \
--header 'Content-Type: application/json' \
--data '
{
"targetId": "<string>",
"targetType": "<string>",
"reason": "<string>",
"details": "<string>"
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/api/v7/reports"
payload = {
"targetId": "<string>",
"targetType": "<string>",
"reason": "<string>",
"details": "<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({
targetId: '<string>',
targetType: '<string>',
reason: '<string>',
details: '<string>'
})
};
fetch('https://api.replyke.com/api/v6/:projectId/api/v7/reports', 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/api/v7/reports",
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([
'targetId' => '<string>',
'targetType' => '<string>',
'reason' => '<string>',
'details' => '<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/api/v7/reports"
payload := strings.NewReader("{\n \"targetId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"reason\": \"<string>\",\n \"details\": \"<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/api/v7/reports")
.header("Content-Type", "application/json")
.body("{\n \"targetId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"reason\": \"<string>\",\n \"details\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/api/v7/reports")
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 \"targetId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"reason\": \"<string>\",\n \"details\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyReport Endpoints
Create Report
Submit a content report for an entity or comment
POST
/
:projectId
/
api
/
v7
/
reports
Create Report
curl --request POST \
--url https://api.replyke.com/api/v6/:projectId/api/v7/reports \
--header 'Content-Type: application/json' \
--data '
{
"targetId": "<string>",
"targetType": "<string>",
"reason": "<string>",
"details": "<string>"
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/api/v7/reports"
payload = {
"targetId": "<string>",
"targetType": "<string>",
"reason": "<string>",
"details": "<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({
targetId: '<string>',
targetType: '<string>',
reason: '<string>',
details: '<string>'
})
};
fetch('https://api.replyke.com/api/v6/:projectId/api/v7/reports', 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/api/v7/reports",
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([
'targetId' => '<string>',
'targetType' => '<string>',
'reason' => '<string>',
'details' => '<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/api/v7/reports"
payload := strings.NewReader("{\n \"targetId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"reason\": \"<string>\",\n \"details\": \"<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/api/v7/reports")
.header("Content-Type", "application/json")
.body("{\n \"targetId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"reason\": \"<string>\",\n \"details\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/api/v7/reports")
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 \"targetId\": \"<string>\",\n \"targetType\": \"<string>\",\n \"reason\": \"<string>\",\n \"details\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodySubmits a report on an entity or comment. If a report already exists for the target, the authenticated user’s report is added to it (increments
Returns
Returns
The error message reflects the reported type, e.g.
reporterCount). If the same user has already reported the same target, a 200 is returned without creating a duplicate.
Authentication required.
Body Parameters
string
required
The UUID of the entity or comment being reported.
string
required
The type of content being reported. One of:
entity, comment.string
required
The reason for the report (e.g., “spam”, “harassment”, “misinformation”). Must not be empty.
string
Optional additional context or description provided by the reporter.
Response
Returns201 Created when a new report is created:
{ "message": "Report submitted successfully", "code": "report/created" }
200 OK when an existing report is updated with a new reporter:
{ "message": "Report updated successfully", "code": "report/updated" }
200 OK when the user has already reported this target:
{ "message": "Report already registered by this user", "code": "report/already-reported" }
Error Responses
Target Not Found — 404
Target Not Found — 404
{ "error": "<targetType> not found", "code": "report/target-not-found" }
"entity not found" or "comment not found".
