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
POST /media--upload/{reference_id}- Upload a file
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
| Name | Type | Required | Description |
|---|---|---|---|
reference_id | string | Yes | The ID of the resource to attach the file to |
Form Data Parameters
| Property | Type | Required | Description |
|---|---|---|---|
file | binary | Yes | File to upload. Default allowed types: PDF, JPEG, PNG, GIF, BMP. Specific fields may have different restrictions. |
domain | string | No | Resource type (e.g. "cases", "invoices"). Defaults to "media--files" if not provided.* |
dotted_path | string | Yes** | 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
| Property | Type | Required | Description |
|---|---|---|---|
_status | string | Yes | Request status. "OK" on success, "ERR" on error. |
url | string | Yes | Temporary signed URL (valid for 1 hour) to access the uploaded file |
Error Responses
| Status Code | Error Message | Description |
|---|---|---|
| 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"
