uploads

Upload a file and return a stable proxy URL.

The returned URL can be used as an attachment in start_design_task. Supports images, PDFs, Office documents (PowerPoint, Word, and Excel spreadsheets), CSV, plain-text/Markdown/HTML, and web-playable video (MP4, WebM, MOV). Pass folder_id to file the upload into a drive folder (see GET /v1/drive/tree).

Size limit: the API gateway caps inbound HTTP request bodies at 32 MiB (33,554,432 bytes) and rejects anything larger with a bare 413 that carries no error envelope — the request never reaches the app. Files above that size (and up to the max_file_bytes cap from GET /v1/uploads/limits, which is per-workspace) must use the two-step signed-URL flow (POST /v1/uploads/url + POST /v1/uploads/register) instead — the bytes go directly to storage and never traverse the gateway. GET /v1/uploads/limits reports both numbers machine-readably.

post/uploads

Request

  • Base URL
    https://api.moda.app/v1
  • URL
    https://api.moda.app/v1/uploads
  • Auth
    HTTP bearer

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 multipart/form-data

filestring binary required
folder_idstring nullable

Destination drive folder (fld_... or a bare folder UUID). The file adopts the folder's visibility, exactly like an in-app upload into that folder. An unknown or inaccessible folder is a 404 folder_not_found; a folder you can see but not edit, or a read-only namespace (Skills, Brand Kits), is a 403 folder_write_denied; brand-kit-managed folders are a 403 brand_kit_folder_protected. Omit to land unfiled (library root).

purpose'voice_source' nullable

voice_source marks a transient recording: the seed of POST /v1/voices/similar or the source_audio of a speech-to-speech take. It always gets its own file (never a duplicate of one you already have, and never handed to another upload of the same bytes), stays out of My Media, and Moda deletes it 24 hours later (expires_at) unless a canvas, brand kit or other surface references it by then. Delete it yourself with DELETE /v1/drive/items/{id} once used. Omit for an ordinary, permanent upload.

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).

folder_idstring nullable

Prefixed fld_ wire ID (Crockford base32 body) — the canonical, recommended form. For back-compat, a bare UUID string is also accepted in both path parameters and JSON request bodies (older integrations that stored raw UUIDs keep working), as is the prefix over a UUID body (fld_00000000-0000-4000-8000-000000000000). All three are permanent, supported inputs; only the canonical form is ever emitted.

expires_atstring nullable

ISO 8601 UTC time after which Moda deletes this transient upload (purpose voice_source), or null for a file that never expires.

Example response

{
  "id": "file_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
  "folder_id": "fld_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
}

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status