files

Create a file and get a presigned upload URL

Creates a file record and returns a presigned upload URL plus the form fields to include in the multipart POST.

Upload the file directly to the returned URL, then reference it by file_id from other resources. The upload URL expires 10 minutes after creation, so request it as part of the same flow that performs the upload.

Each purpose enforces its own MIME allowlist and maximum file size, validated before the presigned URL is issued — a content_type or size_bytes outside the purpose's limits is rejected with a 400.

PurposeAllowed content typesMax file size
dispute_evidenceapplication/pdf, image/png, image/jpeg, image/tiff5 MB
post/api/v1/files/create

Request

  • Base URL: https://dev-api.truemed.com
  • URL: https://dev-api.truemed.com/api/v1/files/create
  • Auth: API key in header x-truemed-api-key

Request body

content_typestring required

The file's MIME type, e.g. application/pdf. Must be allowed for the given purpose.

filenamestring required

The original filename, e.g. receipt.pdf.

purpose'dispute_evidence' required

Business domain a file belongs to. Extensible — each value maps to one *FileManager.

size_bytesinteger required

The file size in bytes. Must be within the per-purpose maximum.

Response

Successful response

expires_atstring date-time required

When the presigned upload URL expires (10 minutes after creation).

file_idstring required

The public file identifier. Reference this id from other resources.

upload_fieldsobject required

Form fields to include in the multipart upload POST, before the file part.

upload_urlstring required

Presigned URL to POST the file to (multipart/form-data).

Changes

No recorded changes to this operation across all 1 revision of this API.