Documentation Index
Fetch the complete documentation index at: https://docs.snipp.gg/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Relay is the Snipp API geared toward the full user experience. It mirrors the public API for uploads and posts, and adds the discover feed, likes, comments, blocking, profile editing, avatar and banner uploads, and view counting.
Relay is intended for first-party clients (for example, the Snipp mobile app). For third-party integrations and SDKs, use the public API at api.snipp.gg.
Base URL
The default base URL is:
relay.snipp.gg is proxied and load-balanced through Cloudflare. It picks the closest healthy region for you, so it’s the fastest option for most requests. Because Cloudflare proxies the traffic, uploads on this host are capped at 100 MB per request.
Regional endpoints
For uploads larger than 100 MB (or when you want to pin a specific region), use a regional endpoint instead. Regional endpoints are unproxied, so there is no 100 MB cap. Your file size limit is whatever your plan allows.
| Region | Host |
|---|
| EU West | eu-west-1.relay.snipp.gg |
| US West | us-west-1.relay.snipp.gg |
You can mix and match. Use relay.snipp.gg for everyday calls and switch to a regional endpoint only when an upload exceeds 100 MB.
To confirm which region served a request, hit GET /region on any host.
Authentication
Relay uses a relay-key header. Each Snipp account has a unique relay key. Treat it like a password.
relay-key: YOUR_RELAY_KEY
Generate, regenerate, or delete your relay key from snipp.gg/settings/relay. Keys are 32 alphanumeric characters ([A-Za-z0-9]).
A missing, empty, or unrecognized relay key returns 401.
Endpoints
| Method | Endpoint | Description |
|---|
GET | /users/{id} | Fetch a user profile. Use @me for your own account. |
GET | /posts/{code} | Fetch a single post by share code. |
POST | /upload | Upload an image or video file. |
GET | /uploads | List all of your uploads. |
PATCH | /editUpload | Update title, description, or privacy of a post. |
POST | /appendUpload | Add files to an existing album. |
DELETE | /deleteUpload | Delete a file or post. |
GET | /discover | Browse public uploads from the community. |
GET | /blocks | List your blocked users. |
POST | /block | Block a user by ID. |
POST | /unblock | Unblock a user by ID. |
POST | /like | Like or unlike a post. |
GET | /comments | List comments on a post. |
POST | /comment | Create a comment on a post. |
DELETE | /comment | Delete a comment. |
POST | /report | Report a post. |
PATCH | /profile | Update profile fields. |
POST | /profile/avatar | Upload a new avatar. |
POST | /profile/banner | Upload a new banner. |
GET | /region | Return the region serving the request. No auth required. |
View Counting
Relay does not expose a dedicated view endpoint. Views increment automatically when a viewer hits GET /posts/{code} or GET /discover.
To prevent inflation, views are deduplicated per IP and post: an IP can contribute up to 3 counted views per post per hour. Views are only counted on public, non-moderated posts.
Rate Limits
Rate limits apply per endpoint, not per account. See Rate Limits for the full table and details on handling 429 responses.
All errors return a JSON object with an error field:
{
"error": "Unauthorized. No relay-key header found."
}
HTTP Status Codes
| Code | Meaning |
|---|
200 | Success |
400 | Bad request. Invalid input, unsupported file type, or file too large. |
401 | Unauthorized. Missing or invalid relay key. |
403 | Forbidden. Account suspended or insufficient permissions. |
404 | Not found |
413 | Payload too large. File exceeds your plan’s size limit. |
429 | Rate limit exceeded |
500 | Internal server error |