Skip to main content
A collection is one lasting place for everything you deliver to a client. Create one per client from your own onboarding code, fill it with folders, and invite the client by email.

Prerequisites

  • A workspace on Leaf (€5/month) or Tree (€15/month). Collections are part of the paid plans; on the free plan every collection endpoint answers 402 upgrade_required. See pricing.
  • An API key with the collections:read and collections:write scopes, exported as YUNGLE_API_KEY.
  • Optional: the CLI (npm install -g yungle-cli) or one of the SDKs, which handle the upload protocol for you.

Steps

1

Create the collection

Send a title and, optionally, a description. The URL slug comes from the title and is unique within your workspace.
The response carries the collection’s id and its secret link in url:
Store the id against the client in your own system. Every later call needs it.
2

Upload folders into it

Register each file with a path, the folder it belongs in. Yungle builds the folder tree for you in one transaction. Registering the same folder again adds to the folders that already exist instead of making a copy.
Registering returns one upload target per file:
The SDKs and the CLI upload the bytes for you. With curl, follow Upload large files to send each file to tusEndpoint.
Storage is reserved when you register, counting files already stored and uploads in flight. If the batch does not fit, you get 413 quota_exceeded and nothing is created: no folders, no file rows.
3

Invite the client as a guest

Send up to 25 addresses per call. Each one gets an email with an invite link that works for 7 days. Inviting the same address twice is safe.
The response lists the addresses that were emailed, lowercased and without duplicates:
A guest can open, view and download this one collection and nothing else. Guests are free and unlimited on every paid plan. Invites count against your workspace’s email budget; when it is spent you get 429 email_budget_exhausted.
4

Check and revoke access

List the guests to see who has accepted: status is invited until they open the invite, then active. Remove a guest to cut off access.
Removing a guest takes effect immediately and also cancels an invite they have not accepted yet.

Who can open the collection

The link says where the collection is. The collection’s visibility says who gets in. Every collection starts as private, including those you create through the API. In that state, holding the link is not enough: only invited guests get in. To let your client in by link alone, open the collection in the dashboard and change who can open it. The API cannot change visibility; PATCH /collections/{id} accepts only title and description. The secret link (url) is 128 bits and checked on every request. Renaming the collection never changes it.

Custom domains

On Tree, you can connect your own domain in the dashboard. A collection can then also be reached at yourdomain.com/<slug>. That readable address is off for every collection you create through the API (customLink: false). A readable address can be guessed, so you switch it on per collection in the dashboard, where the warning sits next to the control. Even when it is on, visibility still decides who gets in.

Next steps

Upload large files

Send the bytes yourself with tus, and resume after a dropped connection.

Receive files

Give a client an upload request that drops their files into the collection.

Webhooks

Get a collection.file_uploaded event when a file lands.

API reference

Every collection endpoint, with its full schema.