The response schema provides the outcome of a file upload including file metadata, storage details, and the status of the upload.
Fields
file_name
StringThe name of the file that was uploaded. This is the original filename provided by the client. Example: "product-image.jpg".
file_path
StringThe complete storage path where the file is stored in GCS. This is the same path returned from the /start API. Format: /{namespace_path}/{hashed_filename}. Used internally for file retrieval. Example: "/misc/general/free/original/abc123-product-image.jpg".
content_type
StringThe MIME type of the uploaded file. This is the content type that was validated during upload. Examples: "image/jpeg", "application/pdf", "text/csv".
namespace
StringThe namespace identifier that was used for the upload. Determines which bucket (public/private) the file is stored in and the validation rules that were applied. Examples: "misc" (public), "application-audience" (private), "products" (product images).
size
IntThe size of the file in bytes. Required for validation to ensure the file doesn't exceed namespace size limits. Used to validate against the namespace's max size constraint before upload. Example: 524288.
upload
UploadContains the upload URL and expiry information from the /start API.
cdn
CDNCDN details for accessing the uploaded file. Contains the URL information needed to retrieve the file from the CDN.
tags
[String]Array of string tags associated with the file. These are the same tags provided during the /start API call. Can be used for filtering, searching, or organizing files. Examples: ["product", "image"], ["invoice", "2024"], []. If no tags were provided, defaults to empty array.
Was this section helpful?