Skip to main content
This page takes you from an API key to a sent transfer and its download receipt. It works on every plan, the free one included.

Prerequisites

  • A Yungle account. Sign up if you do not have one.
  • One of: curl and jq; Node.js 22 or later; or Python 3.9 or later.
  • A small file to send. The samples use report.pdf.
1

Create an API key

In the dashboard, open Settings → API keys and create a key with the transfers:write scope. That scope also lets the key read transfers.The key is shown once. Put it in your environment:
Install the SDK for your language, then check the key works:
The response describes the workspace, its plan and the key:
2

Create a draft transfer

Register the file with its exact size in bytes. The transfer starts as a draft: nothing is live and nobody is emailed until you send it in step 4.
You get back the draft, where to upload, and one upload target per file:
3

Upload the file

File bytes do not go through the JSON API. You stream each file to tusEndpoint with tus, a resumable upload protocol, and send the file’s uploadToken in the x-yungle-upload-token header on every request.
The upload is done when the last request returns 204.
curl sends the whole file in one request and does not resume. That is fine for a small file. For large files, use an SDK or the CLI, which continue from the last committed part after a dropped connection. Upload large files explains the rules.
4

Send it

Finalizing makes the link live. Pass recipients to have Yungle email them the link, or leave it out and share the link yourself. Use your own address while you try this.
The response carries the transfer, with its share url, and who was emailed:
Finalizing is safe to retry: nobody is emailed twice.
5

Read the download receipt

Open the link from the email and download the file. Then ask who downloaded it:
One visit to the link counts as one download, however many files it fetched. Files fetched in the same visit share a sessionId.
Each SDK also does steps 2 to 4 in one call. In Python, yungle.send(["report.pdf"], to=["you@example.com"]) creates, uploads and sends. From a terminal signed in with an API key (yungle login --key), yungle send report.pdf --to you@example.com does the same; see CLI.

Next steps

Send a transfer

Expiry, passwords, download limits, adding files and revoking.

Upload large files

Resuming, chunk sizes and renewing upload tokens.

Webhooks

Get told when a transfer is downloaded instead of polling.

Authentication

Scopes, plans and what each auth error means.