Skip to main content
POST
Add Files
Add one or more files to an existing post. The share code, privacy, title and description stay the same. Adding a file to a single-file post turns it into an album.

Headers

Send the files as multipart/form-data, repeating the file field.

Behavior

  • You must own the post. A team post needs that team’s access key, and a lapsed team returns 403.
  • Requires gallery access on the key.
  • Moderated posts cannot be changed and return 403 with type moderated.
  • A post holds at most limits.max_files files: 10 on Free and 50 on Plus. Ultra and team posts have no limit. A full post, or a request that would go past the cap, returns 400.
  • New files take the post’s privacy. On a private post their URLs are signed and expire after 24 hours.
  • Ultra accounts and team keys can add archives, audio and PDFs, except to a public post, where they fail with unsupported_type. See File Types.
  • Videos are remuxed to MP4, metadata and priority streaming follow the headers or your preferences, and Blur Personal Info checks pictures, exactly as in Upload Files. Videos added here do not get a thumbnail.
  • Each file is checked against your weekly quota on its own. A file that does not fit fails with type quota_exceeded.
  • Failures work like uploads: stored files come back with 200 and the rest are listed in failed. If every file fails, a one-file request returns that file’s error and a multi-file request returns 400 with type upload_failed. See Errors.
  • New files are scanned automatically. If any file, or the post’s text, is flagged, the whole post is moderated.
  • The response is the full updated post.
  • A file of any size can also be added in pieces, sent to this endpoint exactly as in Large Files, with include-metadata and post-priority on the first piece. The post is checked when the first piece arrives and again after the last, and GET /upload/{id} ends with this same {post} body.

Examples

Responses

One of two files failed:

Errors

Authorizations

api-key
string
header
required

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

Headers

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}$

Path Parameters

code
string
required

Post share code.

Body

multipart/form-data
file
file[]
required

One or more files. Repeat the file field.

Response

Success

post
object
required
failed
object[]