1. Create the collection
The response carries url, the collection’s secret link. It is 128 bits and checked on every request; treat it like a password you are allowed to hand to the client.
curl -X POST https://yungle.co/api/v1/collections \
-H "Authorization: Bearer $YUNGLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"De Vries BV","description":"Everything we deliver, in one place."}'
# → { "collection": { "id": "01J…", "url": "https://yungle.co/c/…", … } }2. Upload with the folders intact
Send a path with each file and the folder tree is built for you, in one go. Doing it twice lands in the folders that already exist rather than making copies.
# Uploads the folder, building the same tree inside the collection.
yungle push ./Deliverables --collection 01J…3. Give the client access
Two ways, and they combine:
- Share the link — send
collection.urlyourself, from your own system’s email. - Invite them as a guest —
POST /collections/{id}/guestswith up to 25emailsper call. Guests can view, download, favourite and comment on that one collection and nothing else.
curl -X POST https://yungle.co/api/v1/collections/01J…/guests \
-H "Authorization: Bearer $YUNGLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"emails":["anna@devries.example"]}'A collection created through the API is never reachable at a readable address on your own domain until you switch that on in the dashboard — readable means guessable. See Collections.