Skip to main content
POST
/
uploads
/
from-url
Upload From Url
curl --request POST \
  --url https://api.moda.app/v1/uploads/from-url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_url": "<string>",
  "filename": "<string>"
}
'
{
  "id": "file_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
  "url": "<string>",
  "filename": "<string>",
  "mime_type": "<string>",
  "size_bytes": 123,
  "was_duplicate": false
}

Documentation Index

Fetch the complete documentation index at: https://docs.moda.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key from Settings > Developer > REST API

Headers

Moda-Version
enum<string>
default:2026-05-01

Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.

Available options:
2026-04-12,
2026-05-01
Example:

"2026-05-01"

Body

application/json
source_url
string
required

Public URL of the file to download and store.

filename
string | null

Filename to use. Inferred from URL if omitted.

Response

Successful Response

id
string
required

Unique file identifier (prefixed file_...).

Pattern: ^file_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
Example:

"file_01HT9WK8N3M2J4A5Z6P7Q8R9TV"

url
string
required

Stable proxy URL for the uploaded file. Use this in attachment URLs.

filename
string
required

Filename of the uploaded file.

mime_type
string
required

MIME type of the file.

size_bytes
integer | null

File size in bytes.

was_duplicate
boolean
default:false

True if an identical file already existed (deduplicated).