Update Post
curl --request PATCH \
--url https://api.snipp.gg/posts/{code} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"title": "New title",
"privacy": "public"
}
'import requests
url = "https://api.snipp.gg/posts/{code}"
payload = {
"title": "New title",
"privacy": "public"
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'New title', privacy: 'public'})
};
fetch('https://api.snipp.gg/posts/{code}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'New title',
'privacy' => 'public'
]),
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}"
payload := strings.NewReader("{\n \"title\": \"New title\",\n \"privacy\": \"public\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.snipp.gg/posts/{code}")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"New title\",\n \"privacy\": \"public\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snipp.gg/posts/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"New title\",\n \"privacy\": \"public\"\n}"
response = http.request(request)
puts response.read_body{
"post": {
"code": "AbCd1234",
"url": "https://snipp.gg/p/AbCd1234",
"title": "New title",
"description": null,
"privacy": "public",
"created_at": "2026-09-30T18:42:11.512Z",
"view_count": 128,
"like_count": 42,
"comment_count": 3,
"priority": false,
"file_count": 1,
"files": [
{
"name": "a1b2c3d4e5f6789012345678abcdef01.png",
"url": "https://i.snipp.gg/123456789012345678/a1b2c3d4e5f6789012345678abcdef01.png",
"size": 2487312,
"mime_type": "image/png",
"width": 1920,
"height": 1080,
"thumbnail_url": null
}
],
"team_id": null,
"author": {
"id": "123456789012345678",
"username": "playerone",
"nickname": "Player One",
"avatar": "https://i.snipp.gg/avatars/123456789012345678/7e1f0a2b3c4d5e6f708192a3b4c5d6e7.png",
"verified": false,
"plan": "plus"
},
"liked": false,
"moderated": false,
"restricted": 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>"
}
]
}
}Posts
Update Post
Change a post’s title, description or privacy.
PATCH
/
posts
/
{code}
Update Post
curl --request PATCH \
--url https://api.snipp.gg/posts/{code} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"title": "New title",
"privacy": "public"
}
'import requests
url = "https://api.snipp.gg/posts/{code}"
payload = {
"title": "New title",
"privacy": "public"
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'New title', privacy: 'public'})
};
fetch('https://api.snipp.gg/posts/{code}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'New title',
'privacy' => 'public'
]),
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}"
payload := strings.NewReader("{\n \"title\": \"New title\",\n \"privacy\": \"public\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.snipp.gg/posts/{code}")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"New title\",\n \"privacy\": \"public\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snipp.gg/posts/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"New title\",\n \"privacy\": \"public\"\n}"
response = http.request(request)
puts response.read_body{
"post": {
"code": "AbCd1234",
"url": "https://snipp.gg/p/AbCd1234",
"title": "New title",
"description": null,
"privacy": "public",
"created_at": "2026-09-30T18:42:11.512Z",
"view_count": 128,
"like_count": 42,
"comment_count": 3,
"priority": false,
"file_count": 1,
"files": [
{
"name": "a1b2c3d4e5f6789012345678abcdef01.png",
"url": "https://i.snipp.gg/123456789012345678/a1b2c3d4e5f6789012345678abcdef01.png",
"size": 2487312,
"mime_type": "image/png",
"width": 1920,
"height": 1080,
"thumbnail_url": null
}
],
"team_id": null,
"author": {
"id": "123456789012345678",
"username": "playerone",
"nickname": "Player One",
"avatar": "https://i.snipp.gg/avatars/123456789012345678/7e1f0a2b3c4d5e6f708192a3b4c5d6e7.png",
"verified": false,
"plan": "plus"
},
"liked": false,
"moderated": false,
"restricted": 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>"
}
]
}
}Change a post’s title, description or privacy. Send only the fields you want to change.
Clear the description:
Body
| Field | Type | Description |
|---|---|---|
title | string or null | Up to 30 characters. "" or null clears it. |
description | string or null | Up to 200 characters. "" or null clears it. |
privacy | string | public, unlisted or private. |
Behavior
- Send a JSON body. At least one field is required.
- Text over the limit returns
400; it is never truncated. Surrounding whitespace is trimmed. - You must own the post. For a team post, use that team’s access key.
- Requires gallery access on the key.
- Moderated posts cannot be changed and return
403with typemoderated. - A restricted post cannot be made public and returns
403with typeforbidden. It can still switch betweenprivateandunlisted. - Team posts are always private. Sending
privacy: privateon a team post is accepted and changes nothing; any other value returns403. - Making a post public runs the same automatic scan as a new upload.
- The response is the full updated post.
Examples
Change the title and make the post public:curl -X PATCH "https://api.snipp.gg/posts/AbCd1234" \
-H "api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "New title", "privacy": "public"}'
curl -X PATCH "https://api.snipp.gg/posts/AbCd1234" \
-H "api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"description": null}'
Responses
{
"post": {
"code": "AbCd1234",
"url": "https://snipp.gg/p/AbCd1234",
"title": "New title",
"description": null,
"privacy": "public",
"created_at": "2026-09-30T18:42:11.512Z",
"view_count": 128,
"like_count": 42,
"comment_count": 3,
"priority": false,
"file_count": 1,
"files": [
{
"name": "a1b2c3d4e5f6789012345678abcdef01.png",
"url": "https://i.snipp.gg/123456789012345678/a1b2c3d4e5f6789012345678abcdef01.png",
"size": 2487312,
"mime_type": "image/png",
"width": 1920,
"height": 1080,
"thumbnail_url": null
}
],
"team_id": null,
"author": {
"id": "123456789012345678",
"username": "playerone",
"nickname": "Player One",
"avatar": "https://i.snipp.gg/avatars/123456789012345678/7e1f0a2b3c4d5e6f708192a3b4c5d6e7.png",
"verified": false,
"plan": "plus"
},
"liked": false,
"moderated": false,
"restricted": false
}
}
Errors
| Status | Type | When |
|---|---|---|
400 | invalid_request | No fields, a field of the wrong type, text over the limit, or an invalid privacy |
401 | unauthorized | Missing or invalid key |
403 | forbidden | Not your post, no gallery access, a restricted post made public, or a team post made non-private |
403 | moderated | The post is moderated |
403 | suspended | Your account is suspended |
404 | not_found | No such post |
429 | rate_limited | More than 20 edits in 30 seconds |
Authorizations
Your API key from an app on snipp.gg/settings/apps
Path Parameters
Post share code.
Body
application/json
Response
Success
Show child attributes
Show child attributes