Docs / SDK

TypeScript SDK.

Three lines to ship an encrypted file. Works in Node and the browser.

Install

npm install @sendfast/sdk
# or
pnpm add @sendfast/sdk

Upload a file

import { SendFast } from "@sendfast/sdk";

const sf = new SendFast({ apiKey: process.env.SENDFAST_KEY });

const transfer = await sf.upload({
  files: [encryptedReport],
  expiry: "7d",
  email: "[email protected]",
  message: "Your weekly analytics report",
  passwordProtect: true,
});

console.log(transfer.shareUrl);
// https://sendfast.raicode.tech/t/abc#K2x...vQ9

What the SDK handles

  • Browser-side AES-256-GCM encryption.
  • Chunked uploads against presigned URLs.
  • Key embedding in the URL fragment (never sent to the server).
  • Retries, progress callbacks, and abort signals.

Other methods

sf.getTransfer(transferId);
sf.deleteTransfer(transferId);
sf.listTransfers({ limit: 50 });

API reference

Underlying REST endpoints are documented at /docs#endpoints. The SDK is a thin wrapper — every option maps to a request field.