Skip to main content
POST
Upload Files
Upload between 1 and 10 files in one request on Free or up to 50 on Plus. Ultra and team access keys have no file limit. Every upload creates a post. Two or more files are grouped into one album post unless you ask for individual posts.

Headers

Header values are trimmed and case-insensitive. Boolean headers accept only true or false; anything else returns 400. Preferences are set on the website or with Update Preferences. A change made on the website reaches uploads within a minute. post-privacy never follows the Default Post Privacy preference.

Form Fields

Behavior

  • One file: creates one post. post-type is ignored.
  • Two or more files: creates one album post, or one post per file with post-type: individual.
  • Response shape: when one post is created the body is {url, post}, where url is the direct URL of the post’s first file (post.files[0].url). When several posts are created (individual), the body is {posts}. An album where only one file survived also returns {url, post}.
  • url and post.url: the top-level url is the direct file on i.snipp.gg. post.url is the share page, https://snipp.gg/p/{code}, or https://{domain}/{code} when the account has picked another link domain.
  • Private posts: file URLs are signed and expire after 24 hours. Fetch the post again with GET /posts/{code} for fresh ones.
  • Files (Ultra and team keys): archives, audio and PDFs are stored as-is and their URLs are always signed, whatever the privacy. A post that contains one is never public: if any file in the request is one of these, post-privacy: public is applied as unlisted to every post the request creates. See File Types.
  • Videos: .mp4, .mov and .mkv are remuxed to MP4 with +faststart, so .mov and .mkv come back with an .mp4 name. A file that cannot be remuxed is rejected as corrupt. Uploaded videos get a thumbnail in files[].thumbnail_url. See File Types.
  • Metadata: stripped unless include-metadata is true, or is left out while your Include Metadata preference is on. PNG, JPG, WebP and GIF are stripped at any size without re-encoding, so pixels are untouched; JPG and WebP keep their orientation and GIF keeps its animation. Videos lose container metadata during the remux.
  • Blur Personal Info: when it is on in your preferences (Plus and Ultra, set on the website or with Update Preferences), Snippy checks each PNG, JPG and WebP picture before it is stored and blurs personal details such as email addresses, phone numbers, addresses, account and card numbers, codes and keys. A picture where it found something gets a second look for anything the first one missed. A blurred picture is re-encoded, upright, in its own format. Each look adds a few seconds and uses some of your daily Snippy usage. If the first look cannot run because that usage ran out, or it fails, the picture is stored unblurred. GIFs, animated WebPs, videos and team keys are never checked.
  • Priority streaming: eligible videos use adaptive streaming and spend priority minutes, unless post-priority is false, or is left out while your Adaptive Streaming preference is off. post.priority is true when a video was queued for it. Minutes are charged after the response; if your budget runs out first, the video falls back to standard quality and the post later reports priority: false.
  • Partial failures: files that fail are listed in failed, each with its zero-based index and an error object. The stored files are still returned with 200.
  • Every file failed: a one-file request returns that file’s error at the top level, with 413 for file_too_large, 500 for internal and 400 otherwise. A request with several files returns 400 with type upload_failed and the same failed array. See Errors.
  • Weekly quota: a file that would exceed your weekly usage limit fails with type quota_exceeded, carrying quota, used and resets_at.
  • Size limits: a file over your plan’s per-file limit fails with type file_too_large. One request carries at most 50 GB, even when your weekly quota is larger; send bigger files in pieces (see Large Files). A request whose declared Content-Length is already larger than your weekly quota (or limits.max_files times the per-file limit) is refused with 413 before any file is read.
  • Team keys: posts are always created private, whatever post-privacy says, and count against the team’s quota. No member’s preferences apply, so without the headers metadata is stripped and videos use priority streaming. A lapsed team returns 403 with type forbidden.
  • New posts are scanned automatically. A flagged post is moderated after the response.

Large Files

One request carries at most 50 GB. For bigger files, or to resend one piece instead of the whole file when a connection drops, send the file in pieces to the same POST /upload:
  1. First piece: the first 50 MiB in file, with chunk-index: 0 and file-size set to the size of the whole file, plus any of post-privacy, include-metadata and post-priority, and the title and description fields. The response is 200 with upload.id and upload.region, or 202 as for the last piece when the whole file fits in this one. The file type, your weekly quota and the server’s free space are checked here, so a file that cannot be stored is refused before you send the rest. The whole size is held against your weekly quota until the upload finishes, and anything it did not use is returned.
  2. Middle pieces: each 50 MiB piece with its chunk-index and upload-id, in any order and several at a time. Each returns 200, and a failed piece can be sent again.
  3. Last piece: send it once every other piece has returned 200. The response is 202 with upload.status: processing. If a piece is missing, it is 400 with Missing chunks. and their indexes in missing: send those, then the last piece again.
  4. Result: poll GET /upload/{id} every few seconds until it returns the usual {url, post}, or the error the upload ended with.
  • Every piece except the last is exactly 50 MiB (52,428,800 bytes), and the last is the rest. Any other length returns 400 with Invalid chunk length.
  • Send every piece after the first, and every status check, to https://{region}.api.snipp.gg from upload.region, so they reach the server holding the earlier pieces.
  • A chunked upload always creates one post with one file. post-type has no effect.
  • The same pieces add a large file to an existing post through POST /posts/{code}/files, ending with that endpoint’s {post} body.
  • Pieces have their own rate limit of 600 per minute, separate from whole-file uploads.
  • An upload with no new piece for an hour expires: its pieces are deleted and the held quota is returned.

Examples

One file:
An album:
One post per file:

Responses

One file:
A private upload. The file URLs are signed:
An album:
Individual posts, where the third file went over the weekly quota:
Every file failed:

Errors

Authorizations

api-key
string
header
required

Your API key from an app on snipp.gg/settings/apps

Headers

post-privacy
enum<string>
default:private

public, unlisted or private. Omitted means private. public becomes unlisted when the request contains an archive, audio or PDF file.

Available options:
public,
unlisted,
private
post-type
enum<string>
default:album

album or individual. Only matters for two or more files.

Available options:
album,
individual
include-metadata
boolean

true keeps file metadata, false strips it. Omitted, follows your Include Metadata preference, which is off by default.

post-priority
boolean

true puts videos on priority (adaptive) streaming and false opts them out. Omitted, follows your Adaptive Streaming preference, which is on by default.

chunk-index
integer

Chunked uploads only. Zero-based index of the piece in file. Its presence switches the request into piece mode.

Required range: x >= 0
file-size
integer

Chunked uploads, first piece only. Size of the whole file in bytes.

Required range: x >= 1
upload-id
string

Chunked uploads, every piece after the first. The upload.id returned for the first piece.

Pattern: ^[a-f0-9]{32}$

Body

multipart/form-data
file
file[]
required

1 to limits.max_files files: 10 on Free, 50 on Plus, no limit on Ultra and team keys. Repeat the file field.

title
string

Up to 30 characters.

Maximum string length: 30
description
string

Up to 200 characters.

Maximum string length: 200

Response

Success

One post was created.

url
string
required

Direct URL of the first file (post.files[0].url).

post
object
required
failed
object[]