EmberlyEmberly Docs

Quickstart

Upload your first file with the Emberly API in under 5 minutes.

This guide takes you from a fresh account to your first programmatic upload. If you prefer the web dashboard, see Getting Started.

1. Get Your Upload Token

  1. Log in to embrly.ca
  2. Go to Settings → Profile
  3. Copy your Upload Token

Keep your token private

Your upload token authenticates all API requests. Treat it like a password — never commit it to source control or expose it client-side.


2. Upload a File

Pick your language:

cURL

curl -X POST https://embrly.ca/api/files \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "file=@/path/to/your/file.png"

JavaScript / TypeScript

const form = new FormData();
form.append("file", fileInput.files[0]);
 
const res = await fetch("https://embrly.ca/api/files", {
  method: "POST",
  headers: { Authorization: "Bearer YOUR_TOKEN" },
  body: form,
});
 
const { data } = await res.json();
console.log(data.url); // https://embrly.ca/yourusername/file.png

Python

import requests
 
with open("file.png", "rb") as f:
    res = requests.post(
        "https://embrly.ca/api/files",
        headers={"Authorization": "Bearer YOUR_TOKEN"},
        files={"file": f},
    )
 
print(res.json()["data"]["url"])

PowerShell

$headers = @{ Authorization = "Bearer YOUR_TOKEN" }
$form = @{ file = Get-Item ".\file.png" }
$res = Invoke-RestMethod -Uri "https://embrly.ca/api/files" `
  -Method POST -Headers $headers -Form $form
Write-Output $res.data.url

3. Understand the Response

A successful upload returns:

{
  "success": true,
  "data": {
    "id": "cm7xabc123",
    "name": "file.png",
    "size": 204800,
    "mimeType": "image/png",
    "url": "https://embrly.ca/yourusername/file.png",
    "visibility": "PUBLIC",
    "password": false,
    "createdAt": "2026-06-25T10:00:00Z",
    "expiresAt": null,
    "downloads": 0
  }
}

The url field is the shareable link. Share it anywhere — anyone with the URL can view or download the file.


4. Common Upload Options

Pass these as additional form fields:

FieldValuesDefaultDescription
visibilityPUBLIC, PRIVATEPUBLICPrivate files require login to access
passwordany stringnonePassword-protect the download
expiresAtISO 8601 datenoneAuto-delete the file at this time
domainverified domainyour primaryCustom domain for the URL

Example — private file with a password that expires at year end:

curl -X POST https://embrly.ca/api/files \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "file=@report.pdf" \
  -F "visibility=PRIVATE" \
  -F "password=s3cret" \
  -F "expiresAt=2026-12-31T23:59:59Z"

5. Large Files: Chunked Upload

Files larger than 100 MB should use the chunked upload API to avoid timeout issues and support resumable uploads.

See the Files API: Chunked Upload for the full four-step flow with code examples.


Next Steps

On this page