Skip to main content

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, notifications, 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. 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.
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

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:

HTTP Status Codes