Skip to main content

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
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.
RegionHost
EU Westeu-west-1.relay.snipp.gg
US Westus-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

MethodEndpointDescription
GET/users/{id}Fetch a user profile. Use @me for your own account.
GET/posts/{code}Fetch a single post by share code.
POST/uploadUpload an image or video file.
GET/uploadsList all of your uploads.
PATCH/editUploadUpdate title, description, or privacy of a post.
POST/appendUploadAdd files to an existing album.
DELETE/deleteUploadDelete a file or post.
GET/discoverBrowse public uploads from the community.
GET/blocksList your blocked users.
POST/blockBlock a user by ID.
POST/unblockUnblock a user by ID.
POST/likeLike or unlike a post.
GET/commentsList comments on a post.
POST/commentCreate a comment on a post.
DELETE/commentDelete a comment.
POST/reportReport a post.
PATCH/profileUpdate profile fields.
POST/profile/avatarUpload a new avatar.
POST/profile/bannerUpload a new banner.
GET/regionReturn 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.

Error Format

All errors return a JSON object with an error field:
{
  "error": "Unauthorized. No relay-key header found."
}

HTTP Status Codes

CodeMeaning
200Success
400Bad request. Invalid input, unsupported file type, or file too large.
401Unauthorized. Missing or invalid relay key.
403Forbidden. Account suspended or insufficient permissions.
404Not found
413Payload too large. File exceeds your plan’s size limit.
429Rate limit exceeded
500Internal server error