# Upload an asset file Create a new AssetUpload resource for an existing Asset. Endpoint: POST /asset-uploads Version: 2.0.0 Security: bearerToken ## Request fields (application/json): - `assetId` (string, required) The ID of the [Asset](#tag/Assets) to create an [AssetUpload](#operation/postAssetUpload) for Example: "7af90a8b-7ccd-430f-a85d-e8614015bc47" - `assetFileId` (string,null) The ID of the [AssetFile](#operation/getAssetFiles) to create am asset upload for. If null, a new [AssetFile](#operation/getAssetFiles) is created. Example: "7af90a8b-7ccd-430f-a85d-e8614015bc47" - `path` (string, required) The path of the file including filename and any folders. This path will to set the value of the [Asset](#tag/Assets) [Folder Field](#tag/Folder-Settings). Set to "/" to upload to the top-level in Dash. Example: "/Folder A/Folder D/a_file.jpg" - `size` (integer, required) The size of the file that is to be uploaded (in bytes) Example: 15318362 - `partSize` (integer,null) Optionally specify the part size (in bytes) for multi-part uploading of the file. This must be less than 5368709120, and more than 5242880 unless it is the final part. If omitted or null a default part size will be used. Example: 7000000 - `partUrlsRequest` (object) - `partUrlsRequest.uploadId` (string,null) The unique identifier of the [AssetUpload](#operation/postAssetUpload) to get URLs for. If this is not provided, a new multi-part upload will be generated. Therefore this only needs to be provided when not getting all upload URLs at once. Example: "5a2481e0-819f-4b46-a7e6-143f943345f2" - `partUrlsRequest.urlRequests` (array, required) - `partUrlsRequest.urlRequests.partNumber` (integer, required) 1-based indexing number of the part Example: 2 - `partUrlsRequest.urlRequests.contentMd5` (string,null) The MD5 hash of the content contained within the part Example: "86fb269d190d2c85f6e0468ceca42a20" ## Response 200 fields (application/json): - `result` (object, required) - `result.id` (string, required) The unique identifier for the [AssetUpload](#operation/postAssetUpload) to this [Asset](#tag/Assets) Example: "5a2481e0-819f-4b46-a7e6-143f943345f2" - `result.assetId` (string, required) The ID of the [Asset](#tag/Assets) the [AssetUpload](#operation/postAssetUpload) is for Example: "7af90a8b-7ccd-430f-a85d-e8614015bc47" - `result.assetFileId` (string, required) The ID of the [AssetFile](#operation/getAssetFiles) the [AssetUpload](#operation/postAssetUpload) is for Example: "7af90a8b-7ccd-430f-a85d-e8614015bc47" - `result.uploadParts` (array, required) A list of all the upload part destinations - `result.uploadParts.partNumber` (integer) 1-based indexing number of the part Example: 2 - `result.uploadParts.startByte` (integer) The first byte of the file chunk to upload for this upload part Example: 1048576 - `result.uploadParts.endByte` (integer) The last byte (inclusive) of the file chunk to upload for this upload part Example: 2097151 - `result.uploadParts.url` (string) The URL to put the file chunk to for this upload part Example: "https://fill-this-in-later.com" - `permittedActions` (array, required) - `permittedActions.resourceType` (string, required) Defines the type of the resource that is being permitted to act on Enum: "ACCOUNT", "ASSET", "ASSET_SHARES", "ASSETS", "ASSETS_IN_NO_FOLDERS", "CLOUD_CONNECTION", "CLOUD_CONNECTIONS", "COLLECTION", "COLLECTIONS", "COMMENT", "CUSTOM_TERMS_AND_CONDITIONS", "EMAILS", "FIELD_OPTION", "FIELDS", "INDESIGN_EXTENSION", "INTELLIGENCE_SETTINGS", "METADATA_SCHEMA", "PORTALS", "PRESET_SIZES", "REFERRAL", "SAVED_SEARCHES", "SHOPIFY_INTEGRATION_V2", "SUBSCRIPTION", "THEME", "TOP_LEVEL_FIELD_OPTIONS", "USER_GROUPS", "WEB_USAGE" - `permittedActions.resourceId` (string) The ID of the resource that is being permitted to act on. This may be null if the permission is on the resource type as a whole rather than an individual instance. Example: "7af90a8b-7ccd-430f-a85d-e8614015bc47" - `permittedActions.action` (string, required) Defines the action that is being permitted Enum: "ADD_ASSET_TO_COLLECTION", "ADD_COLLABORATOR_TO_COLLECTION", "APPROVE_ASSETS", "CONFIGURE_SHOPIFY_INTEGRATION", "CREATE_ASSET_SHARES", "CREATE_ASSETS", "CREATE_CHILD_FIELD_OPTIONS", "CREATE_CLOUD_CONNECTIONS", "CREATE_COLLECTIONS", "CREATE_COLLECTION_COMMENTS", "CREATE_COMMENTS", "CREATE_EMBEDDABLE_LINKS", "CREATE_PORTALS", "CREATE_SAVED_SEARCHES", "CREATE_SUBSCRIPTION", "CREATE_TOP_LEVEL_FIELD_OPTIONS", "CUSTOMISE_EMAILS", "DELETE_ASSET", "DELETE_CLOUD_CONNECTION", "DELETE_COLLECTION", "DELETE_COMMENT", "DOWNLOAD_ASSET", "DOWNLOAD_INDESIGN_EXTENSION", "EDIT_ACCOUNT", "EDIT_ASSET", "EDIT_CLOUD_CONNECTION", "EDIT_COLLECTION", "EDIT_COMMENT", "EDIT_FIELDS", "EDIT_INTELLIGENCE_SETTINGS_ADDRESS_LOOKUP", "EDIT_INTELLIGENCE_SETTINGS_IMAGE_AUTO_TAGGING", "EDIT_INTELLIGENCE_SETTINGS_IMAGE_FACIAL_REC", "EDIT_INTELLIGENCE_SETTINGS_TEXT_IN_IMAGE", "EDIT_INTELLIGENCE_SETTINGS_VIDEO_AUTO_TAGGING", "EDIT_INTELLIGENCE_SETTINGS_VIDEO_FACIAL_REC", "EDIT_METADATA_SCHEMA", "EDIT_PRESET_SIZES", "EDIT_THEME", "EDIT_USER_GROUPS", "EXPORT_TO_SHOPIFY", "IMPORT_ASSETS_OR_METADATA", "IMPORT_FROM_CLOUD", "MAKE_REFERRAL", "MANAGE_CUSTOM_TERMS_AND_CONDITIONS", "PROMOTE_ASSETS_TO_LIVE", "PUT_ASSETS_IN_NO_FOLDER", "REMOVE_ASSET_FROM_COLLECTION", "REMOVE_COLLABORATOR_FROM_COLLECTION", "RUN_NATURAL_LANGUAGE_SEARCH", "SEARCH_FOR_VIEW", "SET_ASSETS_LIFECYCLE_STATUS_BINNED", "SET_ASSETS_LIFECYCLE_STATUS_LIVE", "UPDATE_METADATA_WITH_FIELD_OPTION", "USE_CANVA_INTEGRATION", "USE_CLOUD_CONNECTION", "USE_COLLECTIONS", "USE_EMBEDDABLE_LINKS", "VIEW_ASSET", "VIEW_ASSET_EVENTS", "VIEW_ASSET_FACES", "VIEW_ASSETS_IN_NO_FOLDER", "VIEW_CLOUD_CONNECTION", "VIEW_COLLECTION", "VIEW_COMMENTS", "VIEW_WEB_USAGE" ## Response 4XX fields (application/json): - `timestamp` (string) The datetime that the error occurred in ISO offset format Example: "2021-02-16T16:21:58.640+00:00" - `status` (integer) The HTTP status code of the error Example: 401 - `error` (string) The title of the error Example: "Unauthorized" - `message` (string) A more detailed error message - `path` (string) The path that was called which led to the error Example: "/folder-settings"