Skip to content

Media Upload

Upload files to the Amili system. This endpoint is used to attach files to various resources, such as original invoices to cases.

Media Upload endpoints

See Case Registration for creating cases.

Examples

For working code examples including media upload workflows, see Case Flow Examples.

For complete API specification with interactive testing, see Swagger: Media Upload.

Parameters

Path Parameters

NameTypeRequiredDescription
reference_idstringYesThe ID of the resource to attach the file to

Form Data Parameters

PropertyTypeRequiredDescription
filebinaryYesFile to upload. Default allowed types: PDF, JPEG, PNG, GIF, BMP. Specific fields may have different restrictions.
domainstringNoResource type (e.g. "cases", "invoices"). Defaults to "media--files" if not provided.*
dotted_pathstringYes**Path to the field where the file should be stored (e.g. "original_invoice" for cases). Required when domain is not "media--files".*

Response Properties

PropertyTypeRequiredDescription
_statusstringYesRequest status. "OK" on success, "ERR" on error.
urlstringYesTemporary signed URL (valid for 1 hour) to access the uploaded file

Error Responses

Status CodeError MessageDescription
400"Domain '{domain}' is not valid."The specified domain is not registered in the system
400"Dotted Path Not Found in request form"The dotted_path parameter is required when domain is not "media--files"
400"Dotted Path is not valid"The specified dotted_path does not exist in the domain's schema or is not a media file field
400"File is a required attribute."No file was provided in the request
400"The provided file's content type is not allowed."The file type is not allowed for this field. Error message includes expected and actual content types
404"Resource Document Not Found"The resource with the specified reference_id does not exist

*) For complete list of valid domains and dotted paths, please see Media Upload **) Required when domain is not "media--files"