v1

latestOpenAPI 3.1.02026-07-223261135.0 KB
uploads

Upload From Url

Download a file from a URL and store it.

The returned URL can be used as an attachment in start_design_task.

post/uploads/from-url

Headers

Moda-Version'2026-04-12' | '2026-05-01'
Example: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.

Request body

source_urlstring required

Public URL of the file to download and store.

filenamestring nullable

Filename to use. Inferred from URL if omitted.

Response

Successful Response

idstring required

Unique file identifier (prefixed file_...).

urlstring required

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

filenamestring required

Filename of the uploaded file.

mime_typestring required

MIME type of the file.

size_bytesinteger nullable

File size in bytes.

was_duplicateboolean

True if an identical file already existed (deduplicated).

Example response

{
  "id": "file_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
}