NEW Embeddable viewer component — free for PDF & images Learn more →
Open source · MIT licensed

Secure documents & video
with one API call

Tokenized links with watermarks, tracking, and expiry. For PDFs, Office docs, images, and video. Self-hostable. The open-source DocSend alternative.

PDFDOCXPPTXXLSXPNGJPG MP4MOVWEBM
terminal
$ curl -X POST https://api.cloakshare.dev/v1/links \
    -H "Authorization: Bearer ck_live_a1b2c3d4" \
    -F file=@proposal.pdf \
    -F expires_in="72h" \
    -F watermark=true \
    -F require_email=true

// Response:
{"data": {
    "secure_url": "https://view.cloakshare.dev/s/lnk_xK9mP2",
    "status": "active",
    "page_count": 6,
    "rules": {"watermark": true, "require_email": true}
}}
New — Video Sharing

Secure video sharing
with HLS streaming

Upload MP4, MOV, or WebM files. Cloak transcodes to adaptive HLS with 720p and 1080p quality tiers. Canvas-based watermark overlay tracks every viewer. Anti-download protections prevent screen recording and content ripping.

  • + Adaptive bitrate HLS streaming (720p + 1080p)
  • + Canvas watermark overlay on every frame
  • + Watch time analytics and completion tracking
  • + Per-segment signed URLs with auto-refresh
  • + Safari/iOS native HLS with dynamic manifests
  • + Anti-download: no right-click, no PiP, no save
terminal
$ curl -X POST /v1/links \
    -H "Authorization: Bearer ck_live_..." \
    -F file=@training.mp4 \
    -F watermark=true \
    -F require_email=true

// Response:
{"data": {
    "secure_url": "https://view.cloakshare.dev/s/lnk_v8kQ3",
    "file_type": "video",
    "video_metadata": {
      "duration": 324,
      "qualities": ["720p", "1080p"]
    }
}}

How it works

Three API calls. That’s all it takes to secure, share, and track any document or video.

1

Upload via API

POST your file to /v1/links. PDFs, Office docs, images, or video. Set expiry, watermark, email gate in one call.

curl -X POST /v1/links \
  -F file=@deck.pdf \
  -F expires_in="72h"
2

Share the secure link

Recipients open the link in a browser. They see an email gate, then a watermarked viewer. Documents render to canvas. Videos stream via HLS. No downloads.

https://view.cloakshare.dev/s/xK9mP2
3

Track engagement

See who viewed it, how long they spent, which pages they read or how much video they watched. Get webhook notifications in real-time.

GET /v1/links/:id/analytics
{"views": 3, "avg_duration": 45}

Everything you need

Enterprise-grade document and video security, accessible via a simple REST API.

Video Sharing

Upload MP4/MOV/WebM. Adaptive HLS streaming with 720p + 1080p. Canvas watermark on every frame.

Office Documents

DOCX, PPTX, XLSX converted server-side via LibreOffice. Same security as PDFs.

Dynamic Watermarks

Viewer's email baked into every page and video frame. Unique per session.

Link Expiry

Time-based or view-count limits. Revoke access instantly.

Email Gate

Only verified email addresses can view. Restrict by domain.

Page-Level Analytics

Time per page, watch time, completion rate, device, geo, and more.

Webhooks

Real-time notifications when someone views your document or video.

Custom Domains

Serve content from docs.your-saas.com with auto-SSL.

Password Protection

Add a password gate on top of email verification.

Teams & RBAC

Invite team members with admin, member, or viewer roles.

Embeddable Viewer

iframe into your app with PostMessage API integration.

One-Click Revocation

Kill access to any document or video with a single API call.

Try it — no signup required

See how Cloak secures a document or video in under 10 seconds. This uses the real API.

Drop a file here, or click to upload

PDF, images, Office docs, or video · max 20 MB

Supports PDF, DOCX, PPTX, images, and video

Configure

Integrate in 5 minutes

Follow along — this code runs against the real API.

Step 1 — Create a secure link POST /v1/links
# Upload a file and get a secure link
# Works with PDF, DOCX, PPTX, XLSX, images, and video

curl -X POST https://api.cloakshare.dev/v1/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F file=@proposal.pdf \
  -F expires_in="72h" \
  -F require_email=true \
  -F watermark=true

Response

{
  "data": {
    "id": "lnk_xK9mP2nQ",
    "secure_url": "https://view.cloakshare.dev/s/lnk_xK9mP2nQ",
    "status": "active",
    "page_count": 6,
    "rules": {
      "expires_at": "2026-03-03T...",
      "watermark": true
    }
  }
}
Step 2 — Share the link Recipients open in browser
# The secure_url is what you send
# to your recipient.
#
# They see a secure viewer:
# - Email gate
# - Watermarked pages (or video frames)
# - No download button
# - Canvas rendering / HLS streaming

https://view.cloakshare.dev/s/lnk_xK9mP2nQ

Q4 Proposal

6 pages · PDF

email@example.com

View Document

Secured by Cloak

Step 3 — Track engagement GET /v1/links/:id/analytics
# Check analytics on your link

curl https://api.cloakshare.dev/v1/links/lnk_xK9mP2nQ/analytics \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "data": {
    "total_views": 3,
    "unique_viewers": 2,
    "avg_duration": 45,
    "viewers": [{
      "email": "john@acme.com",
      "duration": 62,
      "completion": 0.83,
      "country": "US"
    }]
  }
}
Step 4 — Get notified in real-time POST /v1/webhooks
# Set up a webhook for view events

curl -X POST https://api.cloakshare.dev/v1/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhook",
    "events": ["link.viewed"]
  }'

You'll receive

{
  "type": "link.viewed",
  "data": {
    "link_id": "lnk_xK9mP2nQ",
    "viewer_email": "john@acme.com",
    "duration": 62,
    "completion": 0.83
  }
}

That’s it. 4 API calls to secure, share, and track any document or video.

Built for

Sales teams

Stop competitors from seeing your pricing. Track which prospects actually read your proposals and follow up at the right time.

Fundraising

Track which investors read your pitch deck, how long they spent, and which sections they skipped. Prioritize warm leads.

Platforms

Add secure document and video sharing to your app in 5 minutes. One API, no viewer to build, no infrastructure to manage.

Training & Education

Share training videos with watermarked, tracked access. Know who watched, how far they got, and prevent unauthorized redistribution.

Simple, transparent pricing

Start free. Scale as you grow. No per-seat pricing.

npm Package

$0 forever

Client-side viewer, no API key

  • + Unlimited usage
  • + PDF & image viewing
  • + Client-side watermarks
  • + Client-side email gate
  • + Client-side password
  • + Print & copy protection
  • + "Secured by CloakShare" badge
  • + Works offline
npm install

Free

$0 forever

For side projects and evaluation

  • + 50 links/month
  • + 500 views/month
  • + PDF & image support
  • + Watermarks
  • + Email gate
  • + View tracking
  • + 7-day max expiry
  • + "Secured by Cloak" badge
Get Started

Starter

$29 /month

For growing teams

  • + 500 links/month
  • + 10,000 views/month
  • + Everything in Free
  • + Office docs (DOCX, PPTX, XLSX)
  • + No badge
  • + Webhooks
  • + Password protection
  • + Teams & RBAC
  • + 90-day max expiry
Start Free Trial
Most popular

Growth

$99 /month

For production workloads

  • + 2,500 links/month
  • + 25,000 views/month
  • + Everything in Starter
  • + Video sharing (MP4, MOV, WebM)
  • + HLS streaming (720p + 1080p)
  • + Custom domains
  • + Custom branding
  • + Audit log
  • + Priority support
  • + 1-year max expiry
Start Free Trial

Scale

$299 /month

For enterprise needs

  • + 10,000 links/month
  • + 100,000 views/month
  • + Everything in Growth
  • + Unlimited video transcoding
  • + Embedded viewer
  • + White-label
  • + SSO/SAML
  • + Dedicated support
  • + No expiry limits
Start Free Trial

Open source & self-hostable

Cloak is open source and MIT licensed. Self-host on your own infrastructure with Docker, inspect the code, or contribute. Enable video support with ENABLE_VIDEO=true. The cloud version adds CDN delivery, analytics, webhooks, custom domains, and managed infrastructure.

Get started in 30 seconds:

git clone https://github.com/cloakshare/cloakshare
cd cloak && docker compose up

Frequently asked questions

Common questions about CloakShare, security, and pricing.

What is CloakShare? +
CloakShare is an open-source API for secure document and video sharing. It gives you tokenized links with dynamic watermarks, page-level analytics, email gating, expiry controls, and HLS video streaming. You can self-host it with Docker or use the managed cloud version.
How does canvas rendering prevent copying? +
CloakShare renders documents and video frames onto an HTML canvas element instead of using native PDF viewers or standard video players. Because the content is drawn as pixels on a canvas, there is no selectable text or downloadable source file exposed to the browser. The watermark is composited directly into the rendered output, so it cannot be removed without destroying the content.
Is CloakShare really free? +
Yes. The core project is MIT-licensed and free to self-host with no limits. The managed cloud plan includes a free tier with 25 links per month, watermarks, and analytics. Paid plans add higher limits, custom domains, video support, webhooks, and team features.
Can I embed the viewer in my own app? +
Yes. CloakShare provides an embeddable viewer component that you can add to any web app with an iframe. It includes a PostMessage API for two-way communication between your app and the viewer, so you can control navigation, receive analytics events, and customize the experience. PDF and image embedding is free on all plans.
How is CloakShare different from DocSend? +
CloakShare is open-source, API-first, and self-hostable. DocSend is a closed SaaS product with a web UI. CloakShare supports video with HLS streaming, offers canvas-based rendering for stronger copy protection, and has no per-seat pricing. You can integrate it into your own product via the REST API and SDKs, or self-host it on your own infrastructure.
What file types does CloakShare support? +
CloakShare supports PDF, DOCX, PPTX, XLSX, PNG, and JPG for documents and images. For video, it supports MP4, MOV, and WebM uploads, which are transcoded to adaptive HLS with 720p and 1080p quality tiers. Office documents are converted server-side using LibreOffice and receive the same security features as PDFs.