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": "3997298751857502949109316603173",
"CreatedBy": "3997298751857502949109316239498",
"FileType": "",
"DateCreated": "2024-12-06T22:13:16-08:00",
"FileName": "",
"DisplayName": "",
"FileSize": 10,
"ParentId": "3997298751859808792118529619918",
"IsPrimary": false,
"DateDeleted": "2024-12-06T22:13:16-08: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": "3997298751864420478136957121326",
"CreatedBy": "3997298751864420478136957426792",
"FileType": "",
"DateCreated": "2024-12-06T22:13:16-08:00",
"FileName": "",
"DisplayName": "",
"FileSize": 10,
"ParentId": "3997298751864420478136957987509",
"IsPrimary": false,
"DateDeleted": "2024-12-06T22:13:16-08: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": "3997298751864420478136958370552"
}