Create Comment
curl --request POST \
--url https://relay.snipp.gg/posts/{code}/comments \
--header 'Content-Type: application/json' \
--header 'relay-key: <api-key>' \
--data '
{
"body": "Nice shot!"
}
'import requests
url = "https://relay.snipp.gg/posts/{code}/comments"
payload = { "body": "Nice shot!" }
headers = {
"relay-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'relay-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({body: JSON.stringify('Nice shot!')})
};
fetch('https://relay.snipp.gg/posts/{code}/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://relay.snipp.gg/posts/{code}/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([
'body' => 'Nice shot!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"relay-key: <api-key>"
],
]);
$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://relay.snipp.gg/posts/{code}/comments"
payload := strings.NewReader("{\n \"body\": \"Nice shot!\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("relay-key", "<api-key>")
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://relay.snipp.gg/posts/{code}/comments")
.header("relay-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"Nice shot!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.snipp.gg/posts/{code}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["relay-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"Nice shot!\"\n}"
response = http.request(request)
puts response.read_body{
"comment": {
"id": "9e8d7c6b-5a49-4382-9f1e-0d2c3b4a5968",
"body": "Nice shot!",
"created_at": "2026-10-01T09:20:31.775Z",
"user": {
"id": "123456789012345678",
"username": "playerone",
"nickname": "Player One",
"avatar": "https://i.snipp.gg/avatars/123456789012345678/7e1f0a2b3c4d5e6f708192a3b4c5d6e7.png",
"verified": false,
"plan": "plus"
},
"like_count": 0,
"liked": false
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}Likes and Comments
Create Comment
Comment on a post.
POST
/
posts
/
{code}
/
comments
Create Comment
curl --request POST \
--url https://relay.snipp.gg/posts/{code}/comments \
--header 'Content-Type: application/json' \
--header 'relay-key: <api-key>' \
--data '
{
"body": "Nice shot!"
}
'import requests
url = "https://relay.snipp.gg/posts/{code}/comments"
payload = { "body": "Nice shot!" }
headers = {
"relay-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'relay-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({body: JSON.stringify('Nice shot!')})
};
fetch('https://relay.snipp.gg/posts/{code}/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://relay.snipp.gg/posts/{code}/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([
'body' => 'Nice shot!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"relay-key: <api-key>"
],
]);
$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://relay.snipp.gg/posts/{code}/comments"
payload := strings.NewReader("{\n \"body\": \"Nice shot!\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("relay-key", "<api-key>")
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://relay.snipp.gg/posts/{code}/comments")
.header("relay-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"Nice shot!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.snipp.gg/posts/{code}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["relay-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"Nice shot!\"\n}"
response = http.request(request)
puts response.read_body{
"comment": {
"id": "9e8d7c6b-5a49-4382-9f1e-0d2c3b4a5968",
"body": "Nice shot!",
"created_at": "2026-10-01T09:20:31.775Z",
"user": {
"id": "123456789012345678",
"username": "playerone",
"nickname": "Player One",
"avatar": "https://i.snipp.gg/avatars/123456789012345678/7e1f0a2b3c4d5e6f708192a3b4c5d6e7.png",
"verified": false,
"plan": "plus"
},
"like_count": 0,
"liked": false
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"username": "<string>",
"quota": 123,
"used": 123,
"resets_at": "2023-11-07T05:31:56Z",
"failed": [
{
"index": 123,
"error": "<unknown>"
}
]
}
}Comment on a post.
Body
| Field | Type | Description |
|---|---|---|
body | string | The comment, 1 to 200 characters after trimming. |
Behavior
- Longer comments return
400; they are never truncated. - A post holds at most 500 comments.
- The post’s owner gets a
commentnotification. Every@usernamein the comment gets amentionnotification. - Moderated posts return
403with typemoderated. If the author has blocked you, the response is403with typeblocked. - Drafts, private posts you do not own, team posts you are not a member of, and posts by suspended users return
404. - The response is the new comment.
- Shares a rate limit bucket with Delete Comment: 5 requests per minute.
Examples
curl -X POST "https://relay.snipp.gg/posts/AbCd1234/comments" \
-H "relay-key: YOUR_RELAY_KEY" \
-H "Content-Type: application/json" \
-d '{"body": "Nice shot!"}'
Responses
{
"comment": {
"id": "9e8d7c6b-5a49-4382-9f1e-0d2c3b4a5968",
"body": "Nice shot!",
"created_at": "2026-10-01T09:20:31.775Z",
"user": {
"id": "123456789012345678",
"username": "playerone",
"nickname": "Player One",
"avatar": "https://i.snipp.gg/avatars/123456789012345678/7e1f0a2b3c4d5e6f708192a3b4c5d6e7.png",
"verified": false,
"plan": "plus"
},
"like_count": 0,
"liked": false
}
}
Errors
| Status | Type | When |
|---|---|---|
400 | invalid_request | Empty or too long body, or the post is full |
401 | unauthorized | Missing or invalid key |
403 | moderated | The post is moderated |
403 | blocked | The author has blocked you |
403 | suspended | Your account is suspended |
404 | not_found | No such post, or you cannot see it |
429 | rate_limited | More than 5 requests per minute |