Skip to main content

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;
}
FieldTypeDescription
urlstringDownload URL
mimestringMIME type (e.g. application/pdf)
pathstringStorage path
sizenumberSize (bytes)
fileNamestringFile name
extensionstringExtension (e.g. pdf)
captionstring?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 type field.