Skip to main content

Asset API - Asset Data Format

FileSpin returns Asset data in a standard JSON format as below for all Asset API calls. In addition, data posted to your Webhooks will also be of this format.

Asset Data JSON Format - Example

{
"id": "99d819953914402babbdeb68337ea6a3",
"status": "OK",
"name": "sample.mov",
"size": 8836363,
"checksum": "5f5f26bd7c0f62c6e02e44c73d09734e",
"provider": "local",
"storage_type": "AMAZON_S3",
"bucket": "filespin-labs",
"key": "/99d819953914402babbdeb68337ea6a3/sample.jpg",
"public": false,
"content_type": "video/quicktime",
"creator_id": 272,
"upload_time": "2015-07-02T08:12:56Z",
"update_user_id": 272,
"update_time": "2015-07-02T08:12:56Z",
"upload_source": "upload.example.com",
"data_schema_id": 1,
"metadata": {
"width": 1200,
"height": 800,
"duration": 30
},
"data": {
"foo": "bar"
},
"conversions": {
"720p-video": {
"storage_type": "s3",
"bucket": "filespin-labs",
"key": "/99d819953914402babbdeb68337ea6a3/720p-video.mp4",
"width": 1280,
"height": 720,
"duration": 30,
"size": 716000,
"public": true,
"watermarked": false
},
"hls-video": {
"storage_type": "s3",
"bucket": "filespin-labs",
"key": "/99d819953914402babbdeb68337ea6a3/hls/playlist.m3u8",
"width": 1280,
"height": 720,
"duration": 30,
"size": 716000,
"public": true,
"watermarked": false
}
},
"addons_info": {
"ON_DEMAND_IMAGE": {
"available": true
}
}
}

JSON Parameters​

KeyValueDescription
idstringAsset's unique ID, 32 character alphanumeric UUID
statusstringOK if Asset was saved successfully, NOT_READY if file is being saved, ERROR if the asset has any errors (such as , if it is not a image or a video). ARCHIVED if the asset is archived. An archived asset will be available in read-only mode and cannot be updated.
eventstringfile-saved, file-processed or file-data-updated
namestringFile name
sizeintegerSize of file in bytes
checksumstringMD5 checksum
providerstringThe source of the file, local or one of the supported cloud providers
storage_typestringAMAZON_S3 if s3 else FILESPIN if storage is managed by FileSpin
bucketstringS3 Bucket name
keystringS3 Object key for this file
publicbooleantrue if file is publicly accessible, false otherwise
content_typestringMIME type
creator_idintegerUser Id of file owner
update_user_idintegerUser Id of user updating file derivatives or file data
upload_timestringISO 8601 datetime, when the original file was uploaded
update_timestringISO 8601 datetime, when the asset metadata was last updated
upload_sourcestringwhere the file was sourced from
data_schema_idintegerJSON Schema Id for the asset data
metadataJSONDepending on Addons enabled, file metadata is returned. For image/video files, width, height in pixels and duration in seconds are always returned
dataJSONOptional user-data stored along with an asset
conversionsJSONStandard image/video conversions and those generated by addons
addon_infoJSONIndicates which addons were processed for the asset
errorsJSONErrors if any while processing asset. This will be like: {"original": "Original file appears to be invalid!"}. If there are warnings that do not affect processing but have been captured for an asset, they will be like: {"warning": "This may be a PNG file uploaded as JPG!"}
versionsJSONContent versioning summary: {"live": 4, "count": 2, "pending": 5} — the live version number, how many non-live versions are kept, and the version waiting for release (null if none). {"live": 1, "count": 0, "pending": null} for an asset that has only ever had one version. With a version waiting, also pending_at (submitted, UTC), pending_by (submitter's user id) and pending_needed_by (UTC or null)
version_dataJSONLabel, note and other keys set on the live version (see Assets - Versions). {} when none
metadata_revisionstringOnly in the response of GET /api/v1/assets/{asset_id}/data, not in webhook payloads. An opaque token that changes every time the asset's metadata (data) is written. Send it back as expected_revision on /data/update so the update is refused if someone changed the metadata since you read it. See Retries and conflicts
The importance of Asset Status

When an asset is uploaded, the status may be returned as NOT_READY. Client applications must check if the status is OK before trying to access the asset or invoke further asset processing. This can be done by waiting a few seconds for large files (1GB+) and a few hundred milliseconds for small files (less than 50 MB).

Including relationships​

GET /api/v1/assets/{asset_id}/data accepts an optional ?include=relationships query parameter. When present, the response includes an extra top-level relationships object describing the asset's typed relationships (parents, children, related and custom). The relationships key is omitted unless include=relationships is requested, so it stays off the hot path for callers that do not need relationships.

Asset Data with ?include=relationships

{
"id": "99d819953914402babbdeb68337ea6a3",
"status": "OK",
"...": "...all standard asset data fields...",
"relationships": {
"parents": [
{
"relationship_id": 42,
"relationship_type": "parent_child",
"subtype": "remove_background",
"origin": "auto",
"note": null,
"src_asset_id": "5fc8bc5fba60477e9e163aca6365fb65",
"dst_asset_id": "8e49e08943354b23935e2414e685fdb9",
"direction": "incoming",
"created_at": "2026-06-02T12:00:00Z",
"asset": {
"id": "5fc8bc5fba60477e9e163aca6365fb65",
"name": "product-original.jpg",
"content_type": "image/jpeg",
"status": "OK"
}
}
],
"children": [],
"related": [],
"custom": []
}
}

Each relationship entry uses the same shape as the dedicated Asset Relationships API: parents are parent_child relationships where this asset is the child, children are parent_child relationships where this asset is the parent, related are symmetric relationships, and custom holds any other relationship types. The nested asset is a lightweight summary (id, name, content_type, status) of the asset at the other end of the relationship.