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": "3962053734300124003276305268144",
"CreatedBy": "3962053734300124003276305650350",
"FileType": "",
"DateCreated": "2024-06-13T01:21:46-07:00",
"FileName": "",
"DisplayName": "",
"FileSize": 10,
"ParentId": "3962053734300124003276305312393",
"IsPrimary": false,
"DateDeleted": "2024-06-13T01:21:46-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": "3962053734302429846285519154949",
"CreatedBy": "3962053734302429846285517453378",
"FileType": "",
"DateCreated": "2024-06-13T01:21:46-07:00",
"FileName": "",
"DisplayName": "",
"FileSize": 10,
"ParentId": "3962053734302429846285518760180",
"IsPrimary": false,
"DateDeleted": "2024-06-13T01:21:46-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": "3962053734304735689294731244351"
}