Files
Endpoints for listing, retrieving, updating, and deleting files associated with an instance.
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-07-20T12:25:38.539Z","updated_at": "2025-07-20T12:25:38.539Z"}
List instance files
Returns a paginated list of files owned by the instance.
GEThttp://api.metorial.com/files
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
GEThttp://api.metorial.com/files/:fileId
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
StringOptionalPATCHhttp://api.metorial.com/files/:fileId
curl -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
DELETEhttp://api.metorial.com/files/:fileId
curl -X DELETE "https://api.metorial.com/files/fil_Rm4Mnheq2bfEPhBhP7SY" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..."