Pandafile Pro · API
Send large files from your own code
The Pandafile API lets your website, app or script create a transfer, upload files of up to 1000 GB with resumable uploads, and share a link or email it to recipients. It is included with Pandafile Pro and Team, uses the same rules as the website, and can notify your systems when files are ready, downloaded or signed.
This page is the guide. The API reference lists every endpoint – transfers, file requests, signatures, branding, team, webhooks – with parameters, schemas and examples in curl, JavaScript and Python, generated from the OpenAPI 3.1 document.
Working with an AI agent? The official MCP server lets Claude, Cursor, VS Code and other agents send files and manage transfers for you: npx -y @pandafile/mcp.
Step-by-step guides: send large files from Python · send large files from Node.js and TypeScript · send files from Claude, Cursor and other AI assistants · what the file transfer API can do
Official SDKs and CLI
The quickest way in: the official libraries do the whole flow below (create, resumable upload, complete) in one call, with retries, idempotency keys, pagination and webhook verification built in. Details and more examples: SDKs and CLI.
JavaScript
// npm install @pandafile/sdk
import Pandafile from '@pandafile/sdk';
const pf = new Pandafile({ apiKey: process.env.PANDAFILE_API_KEY });
const { url } = await pf.transfers.send({ files: ['film.mp4', 'stills/'], recipients: ['client@example.com'] });Python
# pip install pandafile
from pandafile import Pandafile
pf = Pandafile() # PANDAFILE_API_KEY
url = pf.transfers.send(["film.mp4", "stills/"], recipients=["client@example.com"]).urlCLI
npm install -g @pandafile/sdk
pandafile login
pandafile send film.mp4 stills/ --to client@example.comPrefer plain HTTP, or another language? The steps below are all there is to it.
1. Get an API key
Open Dashboard → Domain & API and create a key. It looks like pf_live_… and is shown once. Send it with every request:
Authorization: Bearer pf_live_YOUR_KEY
Keep keys on your server. Anyone with a key can send files from your account. You can revoke a key at any time.
- Scopes. A key is
read(GET only),write(also create, change and delete transfers, file requests, signature requests and hook subscriptions) orfull(also branding and team invites). Give each integration the smallest scope it needs. - Test mode. A test key (
pf_test_…) creates test transfers: nobody is emailed, they expire after 24 hours, count toward no limit, are hidden from your normal lists (Sent → Test data) and their webhook events say"livemode": false. Build and run your tests with it, then swap in a live key.
2. Create a transfer
Announce the files you are going to upload (name and size in bytes). Optional: title, message, recipients (up to the usual limit, they get an email with a personal link) and password.
curl -X POST https://pandafile.co/api/v1/transfers \
-H "Authorization: Bearer $PANDAFILE_KEY" -H "Content-Type: application/json" \
-d '{"title":"Final cut","files":[{"name":"film.mp4","size":734003200}],"recipients":["client@example.com"]}'
Response:
{ "id": "k3x9q2m7ab", "ownerToken": "…", "url": "https://pandafile.co/d/k3x9q2m7ab",
"uploadEndpoint": "https://pandafile.co/api/upload", "maxBytes": 734003200, "expiresInDays": 30 }
If you have connected your own domain, url uses it.
3. Upload each file (tus)
Uploads use the open tus protocol, so they resume after a dropped connection. There are tus clients for JavaScript, Python, Go, Java, .NET, Swift and more. Send these metadata fields: transferId, ownerToken, filename and (optional) filetype.
JavaScript (browser or Node) with tus-js-client:
import * as tus from 'tus-js-client';
const upload = new tus.Upload(file, {
endpoint: 'https://pandafile.co/api/upload',
chunkSize: 50 * 1024 * 1024,
retryDelays: [0, 3000, 10000, 30000],
metadata: { transferId: t.id, ownerToken: t.ownerToken, filename: 'film.mp4', filetype: 'video/mp4' },
onSuccess: () => console.log('uploaded'),
});
upload.start();
Python with tuspy:
from tusclient import client
tc = client.TusClient('https://pandafile.co/api/upload')
up = tc.uploader('film.mp4', chunk_size=50 * 1024 * 1024,
metadata={'transferId': t['id'], 'ownerToken': t['ownerToken'], 'filename': 'film.mp4'})
up.upload()
Plain curl (small files; the metadata values are base64):
LOC=$(curl -si -X POST https://pandafile.co/api/upload -H "Tus-Resumable: 1.0.0" \
-H "Upload-Length: $(stat -f%z film.mp4)" \
-H "Upload-Metadata: transferId $(printf %s "$ID" | base64),ownerToken $(printf %s "$TOKEN" | base64),filename $(printf film.mp4 | base64)" \
| awk 'tolower($1)=="location:"{print $2}' | tr -d '\r')
curl -X PATCH "https://pandafile.co$LOC" -H "Tus-Resumable: 1.0.0" -H "Upload-Offset: 0" \
-H "Content-Type: application/offset+octet-stream" --data-binary @film.mp4
4. Finish the transfer
When every file is uploaded, complete the transfer. Recipients are emailed and the link goes live.
curl -X POST https://pandafile.co/api/v1/transfers/$ID/complete \
-H "Authorization: Bearer $PANDAFILE_KEY" -H "Content-Type: application/json" \
-d "{\"ownerToken\":\"$TOKEN\"}"
Other endpoints
The most used ones – the API reference has all of them (file requests, signatures, branding, team, statistics, approvals and more).
| Method | Path | What it does |
|---|---|---|
| GET | /api/v1/me | Your account: plan, limits and usage |
| PATCH | /api/v1/transfers/:id | Change title or message, extend the expiry (up to the transfer's max_expires_at), set or remove the password |
| POST | /api/v1/transfers/:id/recipients | Add recipients and email them the link |
| GET | /api/v1/transfers/:id/downloads | Who downloaded what, and when |
| GET | /api/v1/transfers | Your live transfers (?view=history for expired ones, ?q= to search) |
| GET | /api/v1/transfers/:id | One transfer with files, recipients and downloads, plus max_expires_at: the latest expiry your plan allows for it |
| DELETE | /api/v1/transfers/:id | Delete a transfer and its files now |
| GET | /api/v1/events | Recent events for polling (see below) |
| GET | /api/v1/hooks | Your API webhook subscriptions |
| POST | /api/v1/hooks | Subscribe a URL to events (REST hooks for Zapier/Make) |
| DELETE | /api/v1/hooks/:id | Remove a subscription |
Limits, errors, retries and versions
- Same limits as Pro on the website: up to 1000 GB per transfer, 1500 GB of live storage, files kept 30 days.
- Rate limit: 120 requests per minute per key (bursts up to 120). Every response carries
RateLimit-Limit,RateLimit-RemainingandRateLimit-Reset; a 429 comes withRetry-After. Upload traffic itself is not counted. - Errors are JSON with a matching HTTP status:
{"error": {"type": "invalid_request_error", "code": "resource_missing", "message": "No such transfer."}}. Programs should checkcode;paramnames the field when one was wrong. Every response has anX-Request-Id– send your own to correlate logs. - Retries: send
Idempotency-Key: <unique id>with POST, PATCH and PUT. Repeating a request with the same key within 24 hours returns the first answer instead of doing it twice. - Lists are pages:
?limit=(1–100) and?starting_after=with thenext_cursorof the previous page, untilhas_moreis false. - Versions: send
Pandafile-Version: 2026-11-27. Without it a request uses the version its key was created with; keys from before 27 November 2026 keep the original responses (errors as{"error": "…"}, lists as{"transfers": […], "next": …}).
Webhooks and integrations
Pro and Team accounts can have Pandafile tell other systems when something happens, instead of polling. Open Dashboard → Integrations and add up to 5 integrations:
- Webhook: we POST a signed JSON event to your own HTTPS URL.
- Slack: paste an incoming webhook URL (
https://hooks.slack.com/…) and we post a short, formatted message. - Microsoft Teams: an incoming webhook or Workflows URL (
…webhook.office.com,…logic.azure.com); we post an Adaptive Card. - Discord: a channel webhook URL (
https://discord.com/api/webhooks/…).
Pick the events each integration should receive. Send test event delivers a ping right away, and the delivery log shows the last 50 deliveries with their HTTP status.
In a team, everyone manages their own integrations and receives events for their own transfers, file requests and signature requests. A member's events never go to the owner's integrations, and the other way round.
Events
| Type | When |
|---|---|
transfer.ready | A transfer finished uploading and its link works |
transfer.downloaded | The first download per recipient (personal link) or the first download of a shared link. Tick “every download” to get all of them; data.download.first tells them apart |
transfer.expired | A transfer passed its expiry date and its files were deleted |
approval.created | A recipient approved a transfer or asked for changes |
request.upload | Someone uploaded files to one of your file requests |
signature.completed | Every signer has signed a document you sent for signature |
Payload
Every delivery is one JSON event. created is a Unix timestamp. Payloads never contain file contents, passwords, upload tokens or personal recipient links; recipient emails are included because every integration belongs to the account owner.
POST /your/endpoint HTTP/1.1
Content-Type: application/json
User-Agent: Pandafile-Webhooks/1.0 (+https://pandafile.co/developers)
Pandafile-Event-Id: evt_9Lr2xQ0aVb3kT1mN5pS7dw
Pandafile-Event-Type: transfer.downloaded
Pandafile-Signature: t=1795132800,v1=5f2b…c9a1
{ "id": "evt_9Lr2xQ0aVb3kT1mN5pS7dw", "type": "transfer.downloaded", "created": 1795132800,
"data": {
"transfer": { "id": "k3x9q2m7ab", "title": "Final cut", "url": "https://pandafile.co/d/k3x9q2m7ab" },
"download": { "kind": "zip", "file": null, "recipient": "client@example.com", "first": true, "count": 1,
"at": "2026-11-26T10:00:00.000Z" } } }
The data of the other events:
transfer.ready { "transfer": { "id", "title", "url", "files", "bytes", "expires_at", "recipients": ["…"] } }
transfer.expired { "transfer": { "id", "title", "url", "expired_at" } }
approval.created { "transfer": { "id", "title", "url" },
"approval": { "decision": "approved" | "changes", "name", "recipient", "comment" } }
request.upload { "request": { "id", "title", "url" }, "uploader": { "email" },
"transfer": { "id", "title", "url", "files", "bytes", "expires_at" } }
signature.completed { "signature": { "id", "title", "file_name", "pages", "completed_at",
"signers": [{ "email", "name" }], "url" } }
Verify the signature
Each webhook has its own signing secret (whsec_…), shown once when you create it. New secret replaces it; the old one stays valid for 24 hours and both are signed during that time (two v1= values). The header is t=<timestamp>,v1=<signature>, where the signature is the hex HMAC-SHA256 of <timestamp>.<raw body>. Use the raw request body (not re-serialized JSON), compare in constant time and refuse timestamps older than 5 minutes.
With the SDKs this is one line: await Pandafile.webhooks.verify(rawBody, header, secret) (JavaScript) or webhooks.verify(raw_body, header, secret) (Python). Without them:
Node.js (Express):
import crypto from 'node:crypto';
import express from 'express';
const app = express();
app.post('/pandafile-webhook', express.raw({ type: 'application/json' }), (req, res) => {
const header = req.get('Pandafile-Signature') || '';
const parts = header.split(',').map((p) => p.split('='));
const t = Number(parts.find(([k]) => k === 't')?.[1]);
const expected = crypto.createHmac('sha256', process.env.PANDAFILE_WEBHOOK_SECRET)
.update(`${t}.${req.body}`).digest();
const ok = Math.abs(Date.now() / 1000 - t) <= 300 && parts.some(([k, v]) =>
k === 'v1' && v.length === 64 && crypto.timingSafeEqual(Buffer.from(v, 'hex'), expected));
if (!ok) return res.sendStatus(400);
const event = JSON.parse(req.body);
console.log(event.type, event.data);
res.sendStatus(200); // answer quickly; do slow work afterwards
});
Python (Flask):
import hashlib, hmac, json, os, time
from flask import Flask, request, abort
app = Flask(__name__)
SECRET = os.environ['PANDAFILE_WEBHOOK_SECRET'].encode()
@app.post('/pandafile-webhook')
def pandafile_webhook():
body = request.get_data() # raw bytes
parts = [p.split('=', 1) for p in request.headers.get('Pandafile-Signature', '').split(',') if '=' in p]
t = next((v for k, v in parts if k == 't'), '0')
expected = hmac.new(SECRET, t.encode() + b'.' + body, hashlib.sha256).hexdigest()
if abs(time.time() - int(t)) > 300 or not any(k == 'v1' and hmac.compare_digest(v, expected) for k, v in parts):
abort(400)
event = json.loads(body)
print(event['type'], event['data'])
return '', 200
Delivery, retries and safety
- Answer with any 2xx status within 10 seconds. Anything else (including redirects, which we never follow) is a failed delivery. We read at most 256 KB of your response.
- Failed deliveries are retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours, then marked failed. The same event can arrive more than once: use
idto ignore duplicates. - If an integration fails for 3 days without a single successful delivery, we turn it off and email you. Turn it back on in the dashboard when it is fixed.
- Webhook URLs must be public
https://addresses on port 443 or 8443. We resolve the host ourselves and refuse private, loopback, link-local and cloud-metadata addresses (IPv4 and IPv6).
Zapier, Make and other automation tools
Automation platforms can manage their own webhook subscriptions with your API key (“REST hooks”). Subscriptions made this way are separate from the 5 dashboard integrations (up to 20 per account), show up under Integrations as API subscriptions, and are deleted automatically when you revoke the key they were made with.
Subscribe (Zapier sends target_url and event; url and events work too):
curl -X POST https://pandafile.co/api/v1/hooks \
-H "Authorization: Bearer $PANDAFILE_KEY" -H "Content-Type: application/json" \
-d '{"target_url":"https://hooks.zapier.com/hooks/standard/123/abc/","event":"transfer.ready"}'
HTTP/1.1 201 Created
{ "id": 42, "url": "https://hooks.zapier.com/hooks/standard/123/abc/", "events": ["transfer.ready"],
"all_downloads": false, "secret": "whsec_…", "created_at": "2026-11-26T10:00:00.000Z" }
Unsubscribe with the returned id:
curl -X DELETE https://pandafile.co/api/v1/hooks/42 -H "Authorization: Bearer $PANDAFILE_KEY"
Deliveries to subscriptions are the same signed events as above. For polling triggers and sample data, list recent events (newest first, kept for 30 days). since takes an ISO time, a Unix timestamp or an event id; type filters; limit is 1–100 (default 50).
curl "https://pandafile.co/api/v1/events?since=2026-11-25T00:00:00Z&type=transfer.downloaded" \
-H "Authorization: Bearer $PANDAFILE_KEY"
{ "events": [ { "id": "evt_…", "type": "transfer.downloaded", "created": 1795132800, "data": { … } } ],
"has_more": false }
No-code: Zapier & Make
Connect Pandafile to thousands of apps without writing code. The Pandafile apps for Zapier and Make sign in with an API key (a write key is enough) and use exactly the endpoints on this page.
- Triggers (instant): New transfer ready, Transfer downloaded, Approval received, File request upload, Signature completed. They subscribe through REST hooks and fall back to polling
/api/v1/events. - Actions: Send files (from files or links in your workflow), Create a file request, Add recipients to a transfer. Search: Find a transfer.
- Test keys (
pf_test_…) work too: nobody is emailed and test transfers expire after 24 hours.
Send files by URL
Zapier and Make hand files over as links. POST /api/v1/transfers/from-url lets Pandafile download them itself and send them as one transfer – handy for your own code too:
curl -X POST https://pandafile.co/api/v1/transfers/from-url \
-H "Authorization: Bearer $PANDAFILE_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: invoice-run-2026-03" \
-d '{"title":"Invoices March","files":[{"url":"https://example.com/exports/invoices-march.pdf"}],"recipients":["accounts@example.com"]}'
- Up to 20 public
https://URLs per request (port 443 or 8443), up to your plan's per-transfer limit. At most 3 redirects are followed, and every hop must be a public address again. Optional per file:name; otherwise the name comes fromContent-Dispositionor the URL. - Optional, as for normal transfers:
title,message,recipients,password, plusexpires_at(up to 90 days). - We wait up to 20 seconds. Done:
201with"status": "ready"and the link. Bigger files:202with"status": "uploading"– the download continues on our side,GET /api/v1/transfers/{id}/importshows progress, and thetransfer.readywebhook fires when it is ready. Send"async": trueto get the202straight away. - If a download fails (HTTP error, timeout, too large, a blocked address), the transfer is deleted and the error says which file and why (
url_not_allowed,url_fetch_failed,transfer_too_large).
Embed an upload form on your site
Any file request can be shown on your own website: add ?embed=1 to its link and put it in an iframe. The embedded page has no navigation, footer or ads, shows your branding, and visitors upload straight to Pandafile. Only this page may be framed by other sites.
<iframe src="https://pandafile.co/req/REQUEST_ID?embed=1" title="Upload files"
style="width:100%;height:720px;border:0" loading="lazy"></iframe>
Add a language prefix for a translated form, for example https://pandafile.co/de/req/REQUEST_ID?embed=1. Create requests in the dashboard or with POST /api/v1/requests.
Your own domain
Pro accounts can serve download pages from their own subdomain, for example files.yourcompany.com. Add it in Dashboard → Domain & API, create the CNAME and TXT records shown there, and press Check DNS. HTTPS is set up automatically, and links from the API and in emails then use your domain.