Skip to content

Documentation

Start sending a large file

POST/v1/drops/uploadsDrops

One request carries at most 100 MB. Larger files, up to 5 GB on the plan that allows it, go up in parts: start an upload with the file's size, send each part of part_bytes (67.1 MB; the last one is the rest) in any order and as often as one needs retrying, then finish it. An upload counts as one of the day's files and its size against your storage until it is finished or cancelled, and one not finished within a day is cancelled. Send name and bytes; ending, title and expires_at work as in Share a file.

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredDescription
namestringrequired
bytesintegerrequired
typestringoptionalThe file's content type, a hint only.
endingstringoptional
titlestringoptional
expires_atstringoptionalWhen the link stops working (ISO 8601).

Example request

curl -s -X POST "https://snip.link/v1/drops/uploads" \
  -H "Authorization: Bearer $SNIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Example response

{
  "size": "1.2 GB",
  "status": "open"
}

Response fields

FieldTypeDescription
idstring
namestring
typestring
bytesinteger
sizestring
part_bytesintegerEvery part's size but the last.
partsintegerHow many parts the file goes up in, numbered from 1.
receivedinteger[]Part numbers stored so far.
statusopen | finishing | done
expires_atstringWhen an unfinished upload is cancelled.
link_idstring, nullThe file's link, once finished.

Errors

StatusMeaning
400The body or query is invalid. details names each field.
401The API key is missing, malformed or revoked.
403The plan does not include this. details.upgrade names the plan that does.
413The input is larger than the plan allows per run. details carries the size, the limit and the unit.
429Either the key exceeded its requests-per-second limit (honor Retry-After), or a daily or plan quota is used up (details.reason).

Back to getting started