Contact File Box

Is there a way to interact with a contacts file box (aka: list files, download files, delete, and create files) via the REST API?

As of about a week ago, yes.

How do you get a list of files for a specific contact using the contact_id. When running the list endpoint it is only pulling application level files.

Yes, a given access token can view files associated with that token, or if it has the “Can View Company Files” or “Can Edit Company Files” permissions it can retrieve or modify application-level storage as well. It is possible to create a file for a given contact, however, via the POST verb:

{
  "file_name": "string",
  "file_data": "string",
  "contact_id": 0,
  "is_public": false,
  "file_association": "CONTACT"
}

Thanks.

Do you know how to get a list of files for a contact?

We don’t support that yet (FileBox REST API is brand new), but I’ll forward a ticket to our API product manager to have it added.

2 Likes

Try this - xml-rpc - Keap Developer Portal

In your case you can use following field and table

$returnFields = array(‘Id’,‘FileName’,‘Extension’, ‘Public’);
$files = $app->dsFind(‘FileBox’,1000 ,0,‘ContactId’, 1xxx ,$returnFields);

On a similar note is possible to retrieve a single file (or set of files, based on a rule (i.e. uploaded on certain date)) for a contact so that it can be passed into another application?

The use case is I’m looking to have a file uploaded by a contact via a webform. Have the file stored inside the contacts filebox for future reference, but also passed into another app (think customer support ticket processing) where its required to complete a certain task. Having the files passed into the other app simplifies the workflow for the team member saving time and improving customer experience through quicker response times. I can use Zapier to pass data into the other app if need be.

The roadblock I’ve noticed is that retrieval requires the fileID. But I currently have no way of knowing what the fileID assigned to the uploaded file is as this is issued by Infusionsoft.

Would appreciate your advice on how to best achieve this.

Using REST this would be identified by the remote file key field. You can get that by filtering by filename and contact id.

Hi John,

Thank you for your response that is helpful.

So in theory because the files are being uploaded using the same webform, if when the form is submitted I could trigger an action that gave the uploaded file name a specific name (the file name could be changed from the name of the uploaded file to a predefined name) so that is always the saved in the file box under the same name. That way we could identify the files required using just the contactID.

Does that sound like it would work?

Yeah, that’s what I was thinking. Between the filename you’re looking for and the specific ContactId, you should be able to know your specific files on each contact and you can also pull a list per contact so if you have a naming convention you could leverage that as a method as well.