For the complete documentation index, see llms.txt. This page is also available as Markdown.

File Uploads & Downloads

Attach files to entries and retrieve existing files through your AI assistant.

The AI can upload files to Inistate entries and retrieve download links for existing files. Both operations work in all three modes.

Uploading a File

The AI uses a three-step presigned upload flow that supports files up to 500 MB.

1

Request an upload URL

The AI calls request_upload_url with the file name, MIME type, and size. Inistate returns a pre-signed S3 URL valid for approximately 1 hour.

2

Upload the file to S3

The AI sends the file bytes directly to the S3 URL. The Content-Type header must match exactly.

3

Confirm the upload

The AI calls confirm_upload with the s3Key returned in step 1. Inistate verifies the file is in S3 and returns the file path used in entry field values.

After confirmation, the AI attaches the file to the entry by including the path in a submit_activity call.

"Attach this PDF to invoice INV-1042."

"Upload the signed contract to PO-0234."

"Add a photo to this equipment inspection entry."

  1. Calls request_upload_url with the file details

  2. Performs the S3 PUT

  3. Calls confirm_upload to finalize

  4. Calls submit_activity (edit activity) with the file path set on the relevant File or Image field

Supported file types include documents, images, spreadsheets, and most common formats. Executable files (.exe, .bat, .cmd, .dll, .msi) are blocked.

Downloading a File

To retrieve an existing file from an entry, the AI requests a pre-signed download URL that expires after 1 hour.

"Download the attachment from invoice INV-1042."

"Get the signed contract from PO-0234."

"Show me the photo attached to inspection entry INS-0012."

  1. Calls get_entry to find the file path stored in the File or Image field

  2. Calls download_file with the module name, file GUID, and filename

  3. Returns a pre-signed URL you can open in your browser

Last updated