Report Post
curl --request POST \
--url https://api.snipp.gg/posts/{code}/report \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"reason": "Inappropriate content"
}
'import requests
url = "https://api.snipp.gg/posts/{code}/report"
payload = { "reason": "Inappropriate content" }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Inappropriate content'})
};
fetch('https://api.snipp.gg/posts/{code}/report', 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.snipp.gg/posts/{code}/report",
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([
'reason' => 'Inappropriate content'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-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://api.snipp.gg/posts/{code}/report"
payload := strings.NewReader("{\n \"reason\": \"Inappropriate content\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-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://api.snipp.gg/posts/{code}/report")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Inappropriate content\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snipp.gg/posts/{code}/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Inappropriate content\"\n}"
response = http.request(request)
puts response.read_body{
"reported": true
}{
"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>"
}
]
}
}Posts
Report Post
Report a post to the moderation team.
POST
/
posts
/
{code}
/
report
Report Post
curl --request POST \
--url https://api.snipp.gg/posts/{code}/report \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"reason": "Inappropriate content"
}
'import requests
url = "https://api.snipp.gg/posts/{code}/report"
payload = { "reason": "Inappropriate content" }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Inappropriate content'})
};
fetch('https://api.snipp.gg/posts/{code}/report', 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.snipp.gg/posts/{code}/report",
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([
'reason' => 'Inappropriate content'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-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://api.snipp.gg/posts/{code}/report"
payload := strings.NewReader("{\n \"reason\": \"Inappropriate content\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-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://api.snipp.gg/posts/{code}/report")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Inappropriate content\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snipp.gg/posts/{code}/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Inappropriate content\"\n}"
response = http.request(request)
puts response.read_body{
"reported": true
}{
"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>"
}
]
}
}Report a post to the moderation team.
Behavior
reasonis optional. When sent it must be a string of at most 200 characters after trimming. Longer reasons are rejected, not truncated.- You can report posts you can see. Drafts, team posts, and private posts not shared with you return
404. - You cannot report your own post, a post that is already moderated, or a post whose author has blocked you.
- Reports share one rate limit bucket with user reports: 3 per minute.
Examples
curl -X POST "https://api.snipp.gg/posts/AbCd1234/report" \
-H "api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "Inappropriate content"}'
Responses
{
"reported": true
}
Errors
| Status | Type | When |
|---|---|---|
400 | invalid_request | Invalid code, reason over 200 characters or not a string, or reporting your own post |
401 | unauthorized | Missing or invalid key |
403 | moderated | The post is already 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 | Too many reports |
Authorizations
Your API key from an app on snipp.gg/settings/apps
Path Parameters
Post share code.
Body
application/json
Optional, up to 200 characters.
Maximum string length:
200Response
Success
Available options:
true