Assets: URL Assets

API reference for creating and managing URL assets through the Fileflare API.

Beka Rice Avatar

Written by

Last updated


Create a URL asset — a Fileflare asset that points at a file hosted somewhere else (Dropbox, Drive, your own server). Customers receive a Fileflare-domain redirect link rather than the underlying URL, so download counts and limits still apply.

Requires Bearer authentication with your Fileflare key. Rate-limited to 60 requests per minute.

Endpoint

POST https://app.digital-downloads.com/api/v1/assets/store

Parameters

Body (JSON)

  • filename (string, required) — the display name for the asset
  • size (integer, required) — file size in bytes (used for display)
  • url (string, required) — the destination URL the customer will be redirected to
  • type (string, required) — must be "link" for URL assets

Example request

curl -X POST https://app.digital-downloads.com/api/v1/assets/store \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "Big course bundle",
    "size": 524288000,
    "url": "https://drive.google.com/file/d/abc123/view",
    "type": "link"
  }'

Example response — 200 OK

{
  "asset": {
    "id": "82664d96-6dfd-4343-96b0-05c46f412a5c",
    "filename": "Big course bundle",
    "size": 524288000,
    "is_file": false,
    "is_link": true,
    "url": "https://drive.google.com/file/d/abc123/view"
  }
}

Common errors

  • 422 — missing required field, or url isn’t a valid URL.

Keep learning