Files
Represents files that you have uploaded to Metorial. Files can be linked to various resources based on their purpose. Metorial can also automatically extract files for you, for example for data exports.
Files object
Attributes
object
Objectid
StringThe files's unique identifier
status
EnumThe files's status
file_name
StringThe file's name
file_size
NumberThe file's size in bytes
file_type
StringThe file's MIME type
title
StringThe file's title
purpose
Objectcreated_at
DateThe files's creation date
updated_at
DateThe files's last update date
{"object": "file","id": "example_id","status": "active","file_name": "sample.png","file_size": 123456,"file_type": "image/png","title": "Sample Image","purpose": {"name": "User Image","identifier": "files_image"},"created_at": "2025-08-12T09:45:15.456Z","updated_at": "2025-08-12T09:45:15.456Z"}
List instance files
Returns a paginated list of files owned by the instance.
curl -X GET "https://api.metorial.com/files" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..."
Get file by ID
Retrieves details for a specific file by its ID.
URL Parameters
fileId
StringThe unique identifier for the file
curl -X GET "https://api.metorial.com/files/fil_Rm4Mnheq2bfEPhBhP7SY" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..."
Update file by ID
Updates editable fields of a specific file by its ID.
URL Parameters
fileId
StringThe unique identifier for the file
Request Body
title
StringOptionalcurl -X PATCH "https://api.metorial.com/files/fil_Rm4Mnheq2bfEPhBhP7SY" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"title": "example_title"}'
Delete file by ID
Deletes a specific file by its ID.
URL Parameters
fileId
StringThe unique identifier for the file
curl -X DELETE "https://api.metorial.com/files/fil_Rm4Mnheq2bfEPhBhP7SY" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..."