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": "4000136813365391266228398881708",
"CreatedBy": "4000136813365391266228398950518",
"FileType": "",
"DateCreated": "2024-12-21T04:06:49-08:00",
"FileName": "",
"DisplayName": "",
"FileSize": 10,
"ParentId": "4000136813365391266228400215211",
"IsPrimary": false,
"DateDeleted": "2024-12-21T04:06:49-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": "4000136813367697109237612779367",
"CreatedBy": "4000136813370002952246827530195",
"FileType": "",
"DateCreated": "2024-12-21T04:06:49-08:00",
"FileName": "",
"DisplayName": "",
"FileSize": 10,
"ParentId": "4000136813370002952246825926628",
"IsPrimary": false,
"DateDeleted": "2024-12-21T04:06:49-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": "4000136813370002952246826063199"
}