File (FILE)
Generic file attachment. MIME types that cannot be classified as image, video, or audio fall into this type.
data schema
{
url: string;
mime: string;
path: string;
size: number;
fileName: string;
extension: string;
caption?: string;
}
| Field | Type | Description |
|---|---|---|
url | string | Download URL |
mime | string | MIME type (e.g. application/pdf) |
path | string | Storage path |
size | number | Size (bytes) |
fileName | string | File name |
extension | string | Extension (e.g. pdf) |
caption | string? | Optional caption |
Example
{
"id": "a7b8c9d0-e1f2-3456-0123-567890123456",
"createdAt": "2026-07-24T10:05:00.000Z",
"type": "FILE",
"nameOfSender": "Support Bot",
"isFromSupport": true,
"data": {
"url": "https://os.chatbot.aithinks.net/chat-assets/chats/.../sozlesme.pdf",
"mime": "application/pdf",
"path": "chats/.../sozlesme.pdf",
"size": 1024000,
"fileName": "sozlesme.pdf",
"extension": "pdf",
"caption": "Sözleşme taslağı"
}
}
UI recommendation
- Show a file icon +
fileName+ download link (url). - IMAGE / VIDEO / AUDIO / FILE share the same media schema; the difference is the
typefield.