https://man.liquidfiles.com
LiquidFiles Documentation

This API lists sent messages, i.e. messages you have sent. When viewing the sent messages, you can view the list if available messages, or view an individual message. Viewing the individual message will also view the files attached to the message.

Viewing available Sent Messages

Request URL: /messages/sent
Request VERB: GET

  parameters:
    sent_after        # Date      List messages sent after YYYY-MM-DD
    sent_in_the_last  # Integer   List messages sent in the last X number of hours
    limit             # Integer   Limit the display of a certain number of messages,
                      #           On default all messages will be retrieved

Response:
  messages
    id             # String    The message ID
    sender         # String    The sender of the message
    recipients     # Array     All the specified recpients
    ccs            # Array     All the cc'd recipients
    bccs           # Array     All the bcc'd recipients
    created_at     # Datetime  When the message was created
    expires_at     # Date      When the message expires
    authorization  # Integer   0: Anyone can download
                   #           1: Anyone can download after authentication
                   #           2: Specified Recipients and local users can download
                   #           3: Only Specified Recipients can download
                   #           4: Specified Recipients and Recipient Domains can download
    authorization_description # String  The description of the authorization
    subject        # String    The message subject

Example using curl

curl -s -X GET --user "$api_key:x" -H "Content-Type: application/json" https://test.host/messages/sent

{"sent":
  [
    {
      "id":"1p4EHkeNzM5b2qO7kyNEIy",
      "sender":"user@example.com",
      "recipients":["recipient@customer.com"],
      "ccs":[],
      "created_at":"2011-07-09 06:51:07",
      "expires_at":"2011-07-23",
      "expires_after":2,
      "authorization":3,
      "size":7340032,
      "private_message":false,
      "authorization_description":"Only Specified Recipients can access",
      "url":"https://www.example.com/message/1p4EHkeNzM5b2qO7kyNEIy",
      "subject":"test subject",
      "message":"Test Message",
      "attachments":[
        {
          "id":"JUE1PlqlT0CpI1VX4UbGnx",
          "filename":"intro_movie.mp4",
          "size":2097152,
          "content_type":"video/mp4",
          "checksum":"07dc261df7ff3f428e1f115dfde91ecccd83c9ebb896962918de5a56272141ad",
          "crc32":"8d89877e",
          "created_at":"2011-07-09 06:51:07",
          "url":"https://www.example.com/message/1p4EHkeNzM5b2qO7kyNEIy/JUE1PlqlT0CpI1VX4UbGnx/Q7KQrayc1qdNpuCxSfXx1p/intro_movie.mp4"
        }
      ]
    }
  ]
}

Viewing a message

If you know the message ID (listed above), you can view an individual message.

Request URL: /message/message_id
Request VERB: GET

Response:
  messages
    id             # String    The message ID
    sender         # String    The sender of the message
    recipients     # Array     All the specified recpients
    ccs            # Array     All the cc'd recipients
    bccs           # Array     All the bcc'd recipients
    created_at     # Datetime  When the message was created
    expires_at     # Date      When the message expires
    authorization  # Integer   0: Anyone can download
                   #           1: Anyone can download after authentication
                   #           2: Specified Recipients and local users can download
                   #           3: Only Specified Recipients can download
                   #           4: Specified Recipients and Recipient Domains can download
    authorization_description # String  The description of the authorization
    subject        # String    The message subject
    message        # String    The body of the message
    attachments    # Array     The attached files, each containing:
      filename     # String    The filename
      size         # Integer   The file size in bytes
      content_type # String    The Content-Type for the file
      checksum     # String    The SHA-256 Checksum of the file
      crc32        # String    The Crc32 Checksum of the file
      url          # String    The download URL for the file

Example using Curl

curl -s -X GET --user "$api_key:x" -H "Content-Type: application/json" https://test.host/message/1p4EHkeNzM5b2qO7kyNEIy

{"message":
  {
    "id":"1p4EHkeNzM5b2qO7kyNEIy",
    "sender":"user@example.com",
    "recipients":["recipient@customer.com"],
    "ccs":[],
    "created_at":"2011-07-09 06:51:07",
    "expires_at":"2011-07-23",
    "expires_after":2,
    "authorization":3,
    "size":7340032,
    "authorization_description":"Only Specified Recipients can access",
    "url":"https://www.example.com/message/1p4EHkeNzM5b2qO7kyNEIy",
    "subject":"test subject",
    "message":"Test Message",
    "attachments":[
      {
        "id":"JUE1PlqlT0CpI1VX4UbGnx",
        "filename":"intro_movie.mp4",
        "size":2097152,
        "content_type":"video/mp4",
        "checksum":"07dc261df7ff3f428e1f115dfde91ecccd83c9ebb896962918de5a56272141ad",
        "crc32":"8d89877e",
        "created_at":"2011-07-09 06:51:07",
        "url":"https://www.example.com/message/1p4EHkeNzM5b2qO7kyNEIy/JUE1PlqlT0CpI1VX4UbGnx/Q7KQrayc1qdNpuCxSfXx1p/intro_movie.mp4"
      }
    ]
  }
}

In this example, there's one available attachment. Using the URL, you can download the file. Again, using curl:

curl -s -X GET --user "$api_key:x" -H "Content-Type: application/json" https://test.host/message/1p4EHkeNzM5b2qO7kyNEIy/ZfYoatTMcYQLX0qUutOate/A3ohjLyybRyFMj9x65KbzE/secret_image.jpg

Please note that the URL is a one time URL and it will expire after the file has been downloaded. It's not possible to link to individual files without viewing the message.