Skip to main content
Version: v3

Messages

Documentation for Conversations API

📄️Upload file attachments

Post the necessary fields for the API to upload files. The files need to be a buffer with the key 'fileAttachment'. <br /><br /> <b>Note:</b> One of conversationId or contactId must be provided. <br /><br /> <b>File Size Limits:</b> <ul><li>Maximum file size: 5 MB</li><li>Maximum files per upload: 5</li></ul> <br /> <b>Allowed file types:</b> <br /><br /> <b>Images:</b> JPG, JPEG, PNG, GIF, SVG, HEIC, AI <br /><br /> <b>Videos:</b> MP4, MPEG, 3GP <br /><br /> <b>Audio:</b> MP3, WAV, WAVE, AIFF, AIF, AIFC, GSM, ULAW, OGG, AAC, M4A, AMR <br /><br /> <b>Documents:</b> PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, PPT, PPTX, ODT <br /><br /> <b>Archives:</b> ZIP, RAR <br /><br /> <b>Other:</b> VCF, VCARD (contact files), ICS (calendar files) <br /><br /> The API will return an object with the URLs <br /><br /> <b>Secure attachments:</b> Set <code>isSecureAttachment</code> to <code>true</code> to upload the file as a secure attachment. This is currently supported for the <b>email channel only</b>; support for the remaining conversation channels is coming. <br /><br /> A secure attachment is returned with a <code>/files/d/{slug}</code> URL that is publicly accessible for one hour after upload. After that window the attachment becomes private — to render, download, or retry access, extract the <code>{slug}</code> from the returned URL and call <a href='https://marketplace.gohighlevel.com/docs/ghl/files/get-file-by-slug' target='_blank'><code>GET /files/d/{slug}</code></a> with a bearer token carrying the <code>files.readonly</code> OAuth scope, which returns a short-lived signed download URL. A file uploaded without this flag keeps its existing permanently accessible URL. <br /><br /> <b>Note:</b> From 30 November 2026 every file uploaded through this endpoint is stored as a secure attachment, and the <code>isSecureAttachment</code> field is ignored.