Authentication
Posts
Create Signed Upload
POST
https://api.zira.us/public/files/signed-uploads/create
Description
Use this endpoint when a client needs upload instructions and metadata for a direct file upload.
| Property | Required | Type | Example | Description |
|---|---|---|---|---|
| name | Required | string | field-tag.pdf | Original file name, including extension. |
| fileSize | Required | number | 1024 | File size in bytes. Must be 100 B to 100 MB, and must match the file you upload, unless fileSizeLoose is true. |
| company | Optional | object | { "id": "1216" } | Company that owns the file, as { id }. Required unless you send conversation instead. |
| site | Optional | object | { "id": "1512" } | Site that owns the file, as { id }. Optional, and not allowed alongside conversation. |
| conversation | Optional | object | { "id": "8842" } | Conversation that owns the file, as { id }. Use this instead of company/site — never both. |
| fileType | Optional | string | pdf | File extension. Send this or fileMimeType; with neither, the file is stored as .bin. |
| fileMimeType | Optional | string | application/pdf | Explicit MIME type. Takes precedence over fileType and becomes the required Content-Type of the upload. |
| fileSizeLoose | Optional | boolean | true | When true, fileSize is treated as advisory rather than checked against the bytes you upload. |
| deviceId | Optional | string | 43510 | Data source to attach the file to. Only takes effect when assetType is sent too. |
| assetType | Optional | string | video | What kind of asset this is for the data source. Required alongside deviceId for the attachment to happen. |
| channelId | Optional | string | 45187 | Channel to attach the file to. |
| originProperties | Optional | object | { "id": "corr-123" } | Your own metadata, stored with the file and returned by GET /files/{fileId}. Put an identifier here to match the file back to your record. |