Skip to content

Guide for storing Email Conversations in FileNotes

Use FileNotes to store the email conversation itself, then use Alto Documents to store any related attachments against the same record.

To create an email conversation record, first call POST /file-notes and set fileNoteType to EMail.

{
"fileNoteType": "EMail"
}

Store the returned FileNoteId because you will need it when uploading attachments and when reading the conversation back later.

After creating the FileNote, upload each attachment using Alto.Documents.Api POST /documents/post.

Set:

  • LinkedType to FileNote or HistoryEvent
  • LinkedId to the new FileNoteId
{
"LinkedType": "FileNote",
"LinkedId": "<new_FileNoteId>"
}

This keeps the attachment linked to the email conversation record.

To read email conversations, first retrieve the FileNote data by calling either:

  • GET /inventory/{propertyId}/file-notes
  • GET /file-notes/{fileNoteId}

When reading FileNotes, make sure fileNoteType is set to EMail so that you only retrieve email conversation records.

After retrieving the FileNote, make a second call to GET /documents to retrieve any linked attachments.

Set:

  • LinkedType to FileNote or HistoryEvent
  • LinkedId to the file_note_id
{
"LinkedType": "FileNote",
"LinkedId": "<file_note_id>"
}