Update a file
Changes a file's settings, or replaces the file itself. The body must be multipart/form-data, like the upload. Send only the fields you want to change; empty fields are ignored, so a name or description cannot be cleared. A new file or file_url replaces the stored file. Secret and trusted tokens may call it.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
file_id*stringThe file id.
show?stringComma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
hide?stringComma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
formatted?booleanWhen true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.
falseThe fields to change.
multipart/form-data- body
A multipart/form-data body. Send the file itself in a part named file, or give file_url and Comecero fetches it. Not both, and one file per request. A direct upload may be at most 200 MB (200,000,000 bytes); for a bigger file use file_url. A file fetched from file_url may be up to 500 MB on a live account and 200 MB on a test account. All your files together may use up to 5 GB live and 500 MB test. Your account may have other limits; going over one returns 422 with the code account_limit_exceeded.
file?fileThe file to upload. Its file name must be 50 characters or less. Required on create unless you send file_url. On update, a new file replaces the old one.
binaryfile_url?stringA public URL Comecero downloads the file from. Not a private or local address. The file name is taken from the URL.
urihttp_authorization_username?stringA user name for HTTP basic authentication on file_url, if needed.
http_authorization_password?stringThe password for HTTP basic authentication on file_url.
name?stringYour name for the file. The file name is used when you leave it out.
length <= 75description?stringYour notes about the file.
length <= 256version?stringA version label, for example 2.1.
length <= 10expires_in_days?integerHow many days a new download link works, up to 720. The default is 7. On create it is read only when you also send expires_in_clicks, so send both.
0 <= value <= 720expires_in_clicks?integerHow many clicks a new download link allows. The default is 10.
0 <= valueThe updated file.
application/json- response
A file you uploaded to sell as a download, such as an installer. Give it to a product with file_id, and each buyer gets a download link to it.
object*"file"The object type. Always file.
"file"url*stringThe URL of this file in the API.
urifile_id*stringThe id of the file.
date_created*stringWhen the file was uploaded.
date-timedate_modified*stringWhen the file was last changed.
date-timetest*booleanTrue for a test-mode file.
account_id*stringThe account the file belongs to.
name*stringYour name for the file. The file name when you gave none.
description*|Your notes about the file.
filename*stringThe file name customers download, cleaned to letters, numbers, dashes, underscores and periods.
bytes*integerThe size of the file in bytes.
version*|A version label, for example 2.1.
expires_in_days*integerHow many days a new download link to this file works. The default is 7.
expires_in_clicks*integerHow many clicks a new download link to this file allows. The default is 10.
formatted?Present only when you send formatted=true.
curl -X POST 'https://api.comecero.com/api/v1/files/string'{ "object": "file", "url": "https://api.comecero.com/api/v1/files/0095012700001FiQ2xT7Ab", "file_id": "0095012700001FiQ2xT7Ab", "date_created": "2026-11-01T10:12:40Z", "date_modified": "2026-11-01T10:12:40Z", "test": true, "account_id": "AB1234", "name": "Widget Pro installer", "description": null, "filename": "widget-pro-setup.zip", "bytes": 24518301, "version": "2.1", "expires_in_days": 7, "expires_in_clicks": 10}Get a file GET
Returns one file. Secret and trusted tokens may call it.
Delete a file DELETE
Deletes a file and removes it from storage for good. Download links to it stop working. It is not checked whether products still use it, so remove it from your products first. Secret and trusted tokens may call it.