Getting started
Quickstart
Get an API key and send your first drop with curl, the TypeScript SDK or the CLI.
Create an account and an API key
Sign in, open Settings → Developer and create a key. It starts with
sd_and is shown once, so copy it somewhere safe. Free accounts get keys too.terminalexport SLINGDROP_API_KEY="sd_…"Using the CLI? You can skip this step:
slingdrop loginsigns you in through the browser and creates a key for that machine.Check the key
terminalcurl https://api.slingdrop.my/v1/me -H "Authorization: Bearer $SLINGDROP_API_KEY" # → { "id": "…", "email": "you@example.com", "name": "…", "plan": "free", "limits": { … } }Send your first drop
Pick a tab. The SDK and CLI do the upload step for you, including multipart uploads for big files.
# 1. Create the drop: you get its link and one upload target per file
curl https://api.slingdrop.my/v1/drops \
-H "Authorization: Bearer $SLINGDROP_API_KEY" \
-H "content-type: application/json" \
-d '{
"title": "Q3 plan",
"purpose": "share",
"files": [{ "name": "q3.pdf", "size": 482113, "type": "application/pdf" }]
}'
# 2. Send the bytes. The size must match what you declared.
curl -X PUT https://slingdrop.my/api/uploads/F1 \
-H "x-upload-token: T1" \
--data-binary @q3.pdf
# → { "ok": true } The drop goes live once its last file is in.import { openAsBlob } from "node:fs";
import { Slingdrop } from "@slingdrop/sdk";
const sd = new Slingdrop({ apiKey: process.env.SLINGDROP_API_KEY });
const { drop, shareUrl } = await sd.drops.create(
[{ name: "q3.pdf", data: await openAsBlob("q3.pdf") }],
{ title: "Q3 plan", expiry: "30d" },
);
console.log(shareUrl); // https://slingdrop.my/d/…npm i -g slingdrop
slingdrop login # opens your browser, saves a key on this machine
slingdrop q3.pdf --title "Q3 plan" --expires 30d
# ✓ https://slingdrop.my/d/… (copied)The create call answers right away with the link:
{
"drop": {
"id": "k7Qm2xPa",
"linkId": "k7Qm2xPa",
"url": "https://slingdrop.my/d/k7Qm2xPa",
"expiresAt": null,
"folderId": null
},
"ownerKey": "…",
"files": [{ "id": "F1", "mode": "single", "partSize": 8388608, "token": "T1" }]
}Files over 10 MB
Big files come back with "mode": "multipart". Upload 8 MB parts to PUT /api/uploads/{id}/parts/{n} (numbered from 1), then finish with POST /api/uploads/{id}/complete and the list of { partNumber, etag } each part returned. Details in Drops → Uploads, or let the SDK do it.
What you just made#
- A share drop: files are kept and nobody is asked for feedback. Through the SDK and CLI this is the default; the raw API defaults to
"feedback", which is why the curl example setspurposeexplicitly. - A public link: anyone with it can open the drop. Add a
passcodeor privaterecipientsto lock it down. - Signed in, a share drop is kept until you delete it unless you set
expiry. See expiry.