Saltar al contenido principal

Upload an image or font to a Design

POST 

/artifacts/:artifactId/assets

Send multipart/form-data with one file and optional JSON in the field metadata. The byte limits are 10 MiB for PNG, JPEG, WebP, GIF, AVIF and PDF, 20 MiB for MP3, PCM WAV, Ogg Opus/Vorbis and AAC-LC M4A, 50 MiB for H.264 MP4 and VP8/VP9 WebM, and 5 MiB for WOFF2, OTF, TTF, JavaScript, CSS and JSON. A Design holds up to 128 assets and 256 MiB when hosted asset delivery is enabled. Types are verified against the bytes and recognized suffix. The API returns 400 for asset_type_invalid, asset_media_limits or digest_mismatch, 413 for upload_too_large, and 409 for workspace_asset_quota. Set metadata.path to preserve a relative path. JavaScript, CSS and JSON require a path under vendor/. Upload new bytes to the same path and pin the returned ID to replace an asset. Earlier versions retain their original bytes. An identical upload of path, bytes, usage and altText reuses the admitted asset. Unplaced uploads count for 24 hours. Uploads must arrive within 120 seconds or return 408 with reason upload_timeout. A full upload gate returns 503 with reason upload_busy and Retry-After. New types and sizes require hosted asset delivery. Needs a token with the Designs permission.

Request​

Responses​

Default Response