Less Annoying CRM logo Less Annoying CRM LACRM
Core API Functions

Files

Files can be saved to contact & company records.

Get a file

Gets information about a single file. A link to the file will be returned as FileUrl - this URL only lasts for 5 minutes after being generated.

How to call this function
Function name
GetFile
Parameters
FileId Uid Required

The Id of the file you're trying to get.

Response
{
"FileId": "3952718164579491180649339927369",
"CreatedBy": "3952718164579491180649339760160",
"FileType": "",
"DateCreated": "2024-04-27T04:44:08-07:00",
"FileName": "",
"DisplayName": "",
"FileSize": 10,
"ParentId": "3952718164579491180649338046467",
"IsPrimary": false,
"DateDeleted": "2024-04-27T04:44:08-07:00",
"NumVersions": 10,
"FileUrl": "https://lacrm.s3.amazonaws.com/fileid"
}

Get a contact's files

Returns all files attached to a contact. This doesn't include files attached via a File Link custom field.

How to call this function
Function name
GetFilesAttachedToContact
Parameters
ContactId Uid Required

Id of the contact whose files we want to get

ReturnPreviousVersions Bool Default: false

If true, will return previous versions of the primary files

Response
[
{
"FileId": "3952718164581797023658552442636",
"CreatedBy": "3952718164584102866667766685312",
"FileType": "",
"DateCreated": "2024-04-27T04:44:08-07:00",
"FileName": "",
"DisplayName": "",
"FileSize": 10,
"ParentId": "3952718164584102866667765422719",
"IsPrimary": false,
"DateDeleted": "2024-04-27T04:44:08-07:00",
"NumVersions": 10,
"FileUrl": "https://lacrm.s3.amazonaws.com/fileid"
},
{...},
{...}
]

Create a file

Adds a file to the CRM, attached to a contact. NOTE: This function requires using the multipart/form-data content type to send a file with your request. This will change how your request is structured. Please see the sending files via the API page for more information on how to do this.

How to call this function
Function name
CreateFile
Parameters
ContactId Uid Required

The ID of the contact or company the file will be attached to.

File File object Required

The file you're wanting to upload. This parameter needs to be passed in via multipart/form-data, please see these docs for info how to do this properly.

Response
{
"FileId": "3952718164584102866667765969574"
}