Media

Create an upload page for the media library

Returns an upload page, https://app.hypamoon.com/drop/<token>, open for 24 hours or until the user presses Done. The user drags files or whole folders, or picks photos on a phone; photos are made web-ready in the browser (WebP at most 2048 px plus a 640 px version) and the original is kept privately. Everything lands in the media library under folder; with site_id, Done also puts the files on that site as a new version. Then list them with GET /media and put them on a site with media in POST /sites or PUT /sites/{id}. The url is only in this response.

post/media/links

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/media/links
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: sites:write)

Request body

folderstring

Optional. The folder under /media/ where the files land, like portfolio or menu/2026. Folders the user drags keep their structure inside it: /media/portfolio/project-12/03.webp. Leave it out to use the user's own folder names.

site_idstring uuid

Optional. With a site, Done also puts the files on that site as a new version.

images_onlyboolean

Optional. true: the page only takes images.

strip'location' | 'all' | 'none'

Optional. What the upload page removes, in the user's browser before upload, from photos (JPEG, PNG, WebP) it keeps as they are: originals the user chooses to keep, and photos that would not get smaller as WebP. location (default) removes only the GPS location and keeps camera, date, orientation and copyright; all removes all metadata (the orientation stays so photos stay upright); none keeps the files as they are. Web versions are re-encoded and carry no metadata at all. Use all or none only when the user asks for it.

keep_zipboolean

Optional. true keeps a .zip the user adds as one file (a download, like a plugin or a pack of files) instead of unpacking it. On a site it is served as a download; the deploy check refuses a zip with a program, a password or another archive inside.

Response

The upload page.

idstring uuid required

The id of the drop link; pass it to get_drop (GET /sites/drops/{id}).

status'open' | 'done' | 'expired' required

open: waiting for the user. done: the user uploaded the files. expired: 24 hours passed; create a new one.

site_idstring uuid nullable required

The site the link is for, or null.

created_atstring required
expires_atstring required

When the link stops working (24 hours after it was made).

completed_atstring nullable required

When the user finished uploading, or null.

images_onlyboolean required

True when the link only takes images (an editor made it).

as_isboolean

True when files are kept exactly as they are (for moving a site): no web versions, same names, and paths that follow the user's folders exactly.

keep_zipboolean

True when a .zip stays one file (a download) instead of being unpacked.

strip'location' | 'all' | 'none' required

What the upload page removes from photos before upload: location (the default, only the GPS location), all (all metadata) or none. Web versions are re-encoded and carry no metadata at all.

folderstring nullable required

The folder under /media/ the files land in, or null for the user's own folder names.

max_filesinteger required

How many files the user can add with this link (a photo with its versions counts once).

originals_keptinteger required

How many originals were kept. They are private: never on a site, only downloadable in the portal.

urlstring

Only when the link is created: the page to give the user. It is not shown again.

user_messagestring

A sentence to give the user.

next_stepstring

What to do next.

Changes

No recorded changes to this operation across all 1 revision of this API.