Guides

Replace

API to replace the original content file of an asset while keeping the Asset ID unchanged.

📘

For replacing files from within web pages, use the File Picker in Replace mode . To add or update custom metadata for the asset during replace, see Adding metadata to the asset


HTTP RESPONSE

KeyValueDescription
filesJSONList of files
idstringAsset ID, 32 character alphanumeric UUID
namestringFile name
sizeintegerSize of file in bytes
checksumstringMD5 checksum
content_typestringMIME type
providerstringalways "local" to indicate local upload
successbooleantrue if upload completed, false otherwise
metadataJSONOnly returned for custom plans. Applies to image uploads. Where available, Exiftool tag values for 'ColorMode', 'ColorSpace', 'Orientation', 'Make' and 'Model' are returned. 'Width' and 'Height' are always returned

Response JSON

{
  "files": [
    {
      "id": "99d819953914402babbdeb68337ea6a3",
      "name": "sample.jpg",
      "size": 8836363,
      "checksum": "5f5f26bd7c0f62c6e02e44c73d09734e",
      "content_type": "image/jpeg",
      "metadata": {
        "Make": "Apple",
        "ColorSpace": "sRGB",
        "Model": "iPhone 3G",
        "Orientation": "Horizontal (normal)",
        "width": 1200,
        "height": 800
      }
    }
  ],
  "success": true,
  "provider": "local"
}
Language
Credentials
Header
URL