Modulify

Read a stored file

read_storage_file

Returns the contents of one stored file, base64 encoded.

POST /v1/read_storage_fileScopedata:readRead only

The bytes arrive base64 encoded in a content field alongside the content type and size, so decode them before use. Pass the full key exactly as list_storage_files returned it.

Files over 5 MB are refused with a 413, but the practical limit is far lower. A tool result is cut off at 60,000 characters and base64 inflates by a third, so any file larger than about three quarters of that many bytes comes back truncated and will not decode. Use it for small text, JSON, CSV and SVG files, and get_storage_file_url for anything bigger.

It reads the CMS folder at the top level like any other folder, and keeps working while a storage backup is being restored. See The CMS folder.

Request

Call it with a POST to https://api.modulify.ai/v1/read_storage_file, sending the inputs below as a JSON object. The token needs the data:read scope.

It only reads and changes nothing, so retrying it is safe.

curl -X POST https://api.modulify.ai/v1/read_storage_file \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","key":"KEY"}'

Over MCP, the same method is the read_storage_file tool.

Inputs

Input Type Required Description
projectId string Yes The site id.
key string Yes The full key of the file, from list_storage_files.

Response

Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.